<div dir="ltr"><div>Thank you.</div><div><br></div><div>Yes, I got confused with gdal.VectorTranslate and gdal_translate, when I really meant ogr2ogr. But you realized that already. Great catch.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 7 Feb 2024 at 18:09, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
Javier,
<blockquote type="cite">
<div dir="ltr">
<div>
<div><br>
</div>
<div>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?</div>
</div>
</div>
</blockquote>
<p>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.<br>
</p>
<p><a href="https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-ct" target="_blank">https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-ct</a> : "It
must take into account
the axis order of the source and target CRS."</p>
<p>There's no way to override this.<br>
</p>
<blockquote type="cite">
<div dir="ltr">
<div>
<div><br>
</div>
<div>What about the command line gdal_translate?<br>
</div>
</div>
</div>
</blockquote>
<p>Same as ogr2ogr / gdal.VectorTranslate</p>
<p>Even</p>
<span style="white-space:pre-wrap">
</span>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote></div>