Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

By default the OGR-Driver will swap the axis order to longitude, latitude for geographic coordinate systems.

"Since OGR 1.8.0, the GML driver has coordinate system support. This is only reported when all the geometries of a layer have a srsName attribute, whose value is the same for all geometries. For srsName such as "urn:ogc:def:crs:EPSG:", for geographic coordinate systems (as returned by WFS 1.1.0 for example), the axis order should be (latitude, longitude) as required by the standards, but this is unusual and can cause issues with applications unaware of axis order. So by default, the driver will swap the coordinates so that they are in the (longitude, latitude) order and report a SRS without axis order specified."

Example (1): urn:ogc:def:crs:EPSG::4326 - GML 3.2 (WGS 84)
Lat / Lon is swapped to Lon / Lat by the driver (result: correct import into QGIS).
http://www.weichand.de/tmp/wfs20gml32_epsg4326.gml

Example (2): urn:ogc:def:crs:EPSG::31468 - GML 3.2 (Gauß Krüger 12°)
North / East is NOT swapped to East / North (result: incorrect import into QGIS).
http://www.weichand.de/tmp/wfs20gml32_epsg31468.gml

Example (3): urn:ogc:def:crs:EPSG::25832 - GML 3.2 (ETRS89 UTM 32N)
Default: East / North (result: correct import into QGIS).
http://www.weichand.de/tmp/wfs20gml32_epsg25832.gml

Is there any reason why OGR 1.9.2 don’t swap the coordinates of projected systems (to East / North)?

Thanks in advance
Juergen

share|improve this question
    
it's not clear why you would expect EPSG:31468 to be swapped? –  iant Dec 13 '12 at 12:22
    
QGIS will not import the data with an axis order of North / East correctly (EPSG:31468). correct import / incorrect import –  Juergen Weichand Dec 13 '12 at 12:49
    
this problem seems to be still there in QGIS Dufour. It had been fixed in an earlier version (Lisboa). At that time, there was a mapping table specifying for which EPSG-Codes E,N and for which N,E has to be used. This does not seem to be used anymore. When adding a WMS, you can check "reverse axis order", but not when adding a GML file. Have you found any workaround since? I've also tried using QGIS dev. Same thing. Have you opened a ticket with QGIS? Thanks Jeff –  jaykayone Jan 30 at 13:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.