[gdal-dev] axis order in gdal_translate

Javier Jimenez Shaw j1 at jimenezshaw.com
Wed Feb 7 11:08:18 PST 2024


Thank you.

Yes, I got confused with gdal.VectorTranslate and gdal_translate, when I
really meant ogr2ogr. But you realized that already. Great catch.

On Wed, 7 Feb 2024 at 18:09, Even Rouault <even.rouault at spatialys.com>
wrote:

> 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/731df03c/attachment.htm>


More information about the gdal-dev mailing list