[gdal-dev] axis order in gdal_translate

Even Rouault even.rouault at spatialys.com
Wed Feb 7 09:09:48 PST 2024


Javier,
>
> Is there a way to tell gdal.VectorTranslate that transformation is 
> "always_xy", and I do not have to do the swaps manually? Or maybe 
> there is a better way to do it?

If you specify a pipeline, you need to make sure it is written in a way 
where its input coordinates are in the order of the input CRS and its 
output in the order of the axis of the output CRS. The rationale being 
that you copy&paste blindly a pipeline that projinfo -s FOO -t BAR would 
output.

https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-ct : "It must 
take into account the axis order of the source and target CRS."

There's no way to override this.

>
> What about the command line gdal_translate?

Same as ogr2ogr / gdal.VectorTranslate

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20240207/569ca4d6/attachment.htm>


More information about the gdal-dev mailing list