[gdal-dev] Different results for osr.CoordinateTransformation() when using gdal 3.0.1 and 2.4.2 python bindings and transform to EPSG:4326
Sean Gillies
sean at mapbox.com
Thu Sep 19 08:26:02 PDT 2019
Hi,
On Thu, Sep 19, 2019 at 8:31 AM Klaus Braun <
klaus.braun at geographie.uni-freiburg.de> wrote:
> Hi,
>
> on my SUSE box I compiled gdal 2.4.2 and 3.0.1 in the same way, enabling
> python
> bindings.
>
> When I use osr.CoordinateTransformation() in my python script to do a
> coordinate
> transformation from a point to EPSG 4326 the resulting coordinates are
> swaped if
> I use gdal 3.0.1 python bindings.
>
> Any idea what might be the problem in this case?
>
> Regards
>
> Klaus
>
GDAL 3 has a big change for coordinate transformations, See
https://gdal.org/development/rfc/rfc73_proj6_wkt2_srsbarn.html#axis-order-issues
The gist of it is you need to
call SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER) on your spatial
reference objects to preserve the behavior seen in GDAL 2.4.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190919/9e78316b/attachment.html>
More information about the gdal-dev
mailing list