[gdal-dev] Clarifying AxisMappingStrategy for SpatialReference read from GeoJSON in gdal > 3
Yann-Sebastien Tremblay-Johnston
yanns.tremblay at gmail.com
Tue Apr 28 16:24:32 PDT 2020
Hi,
Tested using conda gdal 3.0.4 and gdal bundled with QGIS (3.0.4)
>From the documented changes in gdal > 3 with respect to honouring
coordinate order i.e. lat/lon order for EPSG:4326, I would expect that when
from osgeo import ogr
> ds = ogr.Open('test.geojson')
> layer = ds.GetLayer()
> srs = layer.GetSpatialRef()
> print(srs.GetAxisMappingStrategy())
to yield
1 # OAMS_AUTHORITY_COMPLIANT
but it yields 0 (OAMS_TRADITIONAL_GIS_ORDER).
I see that the wording in
https://gdal.org/tutorials/osr_api_tut.html?highlight=coordinate%20order#crs-and-axis-order
only
mentions the OGR Coordinate Transformation class (w.r.t honouring axis
order), so is the SpatialReference when reading from GeoJSON in how I've
shown above the intended behavior? I've tried this on both a GeoJSON
without an explicit crs designation and one with a crs
of urn:ogc:def:crs:OGC:1.3:CRS84 and both have the same result
(OAMS_TRADITIONAL_GIS_ORDER).
Cheers,
Sebastien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200428/b8d00e2e/attachment.html>
More information about the gdal-dev
mailing list