Opened 7 years ago

Closed 7 years ago

#7035 closed enhancement (invalid)

Estimated SRS information for GML without .gfs

Reported by: mkuhn Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

At the moment, when opening a GML file the SRS information is only announced on layer level if there's a .gfs file shipped next to it. As soon as there is a .xsd companion file and no .gfs, there will be no SRS information available on layer level.

Based on the discussion in QGIS pull request 5143 [1] it would be desirable to also have SRS information available on layer level when the .gml file arrives without a .gfs file. This can be done by taking SRS information from the first feature found in the .gml file under the assumption that all features will have the same SRS.

This behavior should be opt-out, so people who actually deal with multi-SRS datasets have the possibility to stick to the current behavior.

If the layer is opened with estimated SRS information and a feature is exposed with a different SRS than the one announced on layer level, a warning shall be raised and the feature reprojected (if possible).

[1] https://github.com/qgis/QGIS/pull/5143#issuecomment-328089574

Change History (2)

comment:1 by Even Rouault, 7 years ago

Summary: Estimated SRS information for GML without XSDEstimated SRS information for GML without .gfs

comment:2 by Even Rouault, 7 years ago

Resolution: invalid
Status: newclosed

Hum actually looking closer at the code, I realize this is already implemented since GDAL 2.0...

You have to provide the FORCE_SRS_DETECTION=YES open option. e.g with -oo FORCE_SRS_DETECTION=YES with ogrinfo / ogr2ogr, or with GDALOpenEx()

Note: See TracTickets for help on using tickets.