[gdal-dev] Possible bug in gdal.TransformPoint() gdal 3.0.1

Deschamps, Benjamin (EC) benjamin.deschamps at canada.ca
Wed Jan 8 10:28:04 PST 2020


Thanks (as always!) Even for the quick response and good resources.

For posterity, that is osr, not ogr:
in_crs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)

It also seems to impacts CRSs imported from WKT and PROJ4, not just from EPSG as indicated in the release note.

Benjamin

-----Original Message-----
From: Even Rouault <even.rouault at spatialys.com> 
Sent: January 7, 2020 16:57
To: gdal-dev at lists.osgeo.org
Cc: Deschamps, Benjamin (EC) <benjamin.deschamps at canada.ca>
Subject: Re: [gdal-dev] Possible bug in gdal.TransformPoint() gdal 3.0.1

Benjamin,

> Not sure if this is a bug so posting here first...

This is an intented change of behaviour of GDAL 3. See
https://github.com/OSGeo/gdal/blob/release/3.0/gdal/MIGRATION_GUIDE.TXT#L10

> from osgeo import osr
> in_crs = osr.SpatialReference()
> in_crs.ImportFromEPSG(4326)

If you want to keep long lat ordering, add

in_crs.SetAxisMappingStrategy(ogr.OAMS_TRADITIONAL_GIS_ORDER)

Even

--
Spatialys - Geospatial professional services http://www.spatialys.com


More information about the gdal-dev mailing list