<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 4 Mar 2022, 13:12 Idan Miara, <<a href="mailto:idan@miara.com">idan@miara.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hi, <div dir="auto">Are you familiar with the axis order that was introduced in gdal 3 and its affects on 4326?</div><div dir="auto"><a href="https://gdal.org/tutorials/osr_api_tut.html#crs-and-axis-order" target="_blank" rel="noreferrer">https://gdal.org/tutorials/osr_api_tut.html#crs-and-axis-order</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 4 Mar 2022, 13:07 Hugo, <<a href="mailto:hfpmartins@gmail.com" target="_blank" rel="noreferrer">hfpmartins@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi guys,<div><br></div><div>I'm having weird behavior using ogr and osr through python while reprojecting point geometries. </div><div><br></div><div>Following code:</div><div>wgs = osr.SpatialReference()<br>wgs.ImportFromEPSG(4326)<br><br>etrs = osr.SpatialReference()<br>etrs.ImportFromEPSG(3763)<br><br>geom = ogr.Geometry(ogr.wkbPoint)<br>geom.AddPoint(-9.10165,38.73981)<br>#geom.AddPoint(38.73981,-9.10165)</div><div>geom.AssignSpatialReference(wgs)<br><br>reproj = osr.CoordinateTransformation(wgs, etrs)<br>geom.Transform(reproj)</div><div><br></div><div>If I run it as it is I get wrong coordinates in the target SRS. However if I switch X,Y when building the geometry (the commented line) I will get the correct coordinates. What is weird is that I have another script reading from geonames dataset and there this behavior doesn't happen.</div><div><br></div><div>I'm using GDAL 3.4.1 installed through conda on Ubuntu 20.04.</div><div><br></div><div>Any hints?</div><div>thanks in advance<br clear="all"><div><br></div>-- <br><div dir="ltr" data-smartmail="gmail_signature">Hugo Martins<br></div></div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>
</blockquote></div></div></div>