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).

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).

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

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

Thanks in advance

  • it's not clear why you would expect EPSG:31468 to be swapped? – Ian Turton 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 '14 at 13:58
  • as a workaround what I did was create a custom projection and just add the following +axis neu – Antonio Locandro Nov 20 '15 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.