[gdal-dev] OGR-Driver GML axis order handling (GDAL, QGIS)
Jürgen Weichand
Juergen at Weichand.de
Thu Dec 13 11:35:36 PST 2012
Hello List,
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."
http://www.gdal.org/ogr/drv_gml.html
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
Original Post @
http://gis.stackexchange.com/questions/43896/ogr-driver-gml-axis-order-handling-gdal-qgis
More information about the gdal-dev
mailing list