[Qgis-developer] GML axis order handling using OGR Vector Driver

Jürgen Weichand Juergen at Weichand.de
Sat Jun 16 05:43:10 PDT 2012

Hello everyone,

The axis order in WFS 1.1 and WFS 2.0 is based on the input of the 
EPSG-Registry (http://www.epsg-registry.org). Please note that there may 
be different axis orders used by the reference systems.

urn:ogc:def:crs:EPSG:4258 (ETRS 89) – Latitude, Longitude

urn:ogc:def:crs:EPSG:25832 (UTM 32 North) – Easting, Northing

urn:ogc:def:crs:EPSG:31468 (Gauß Krüger 4) – Northing, Easting

The OGR driver in QGIS is not able to detect the axis order, so the data 
will be handled wrong, if the axis order is Northing, Easting (or 
Latitude, Longitude). Is there a way to force the OGR driver to switch 
the axis order?

QgsVectorLayer(filename, title, "ogr") ?

The same problem exits if you loading GML files using “Add Vector 
Layer”. There should be a switch to set the axis order.

The QGIS WFS 2.0 Plugin (0.7) is currently using the following 
(unofficial?) convention:

Using the deprecated srsName-Style „EPSG:4326“ instead of 
„urn:ogc:def:crs:EPSG:4326“ will force the WFS Server to use Easting, 
Northing (Longitude, Latitude) axis order.


This convention is supported by GeoServer and deegree, but could fail 
with other server.

Is there a better solution?

Best regards
Juergen Weichand

[Blog: http://www.weichand.de]

More information about the Qgis-developer mailing list