<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>I suspect you are running into
<a class="moz-txt-link-freetext" href="https://gdal.org/en/stable/tutorials/osr_api_tut.html#crs-and-axis-order">https://gdal.org/en/stable/tutorials/osr_api_tut.html#crs-and-axis-order</a></p>
<p>Concretely try adding:</p>
<p><span class="pl-s1">source_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)</span></p>
<p><span class="pl-s1">at line 34.</span></p>
<p><span class="pl-s1">Even<br>
</span></p>
<p><span class="pl-s1"><br>
</span></p>
<div class="moz-cite-prefix">Le 10/01/2025 à 17:49, ky via gdal-dev
a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAAvXUUrupFo=adKma0LhavoanPF5_t1kVV0GxsD7XZOhnT63hA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>Hello all, hope you are well</div>
<div><br>
</div>
<div>Got some unexpected results computing area using
GDAL==3.4.1 and official Brazilian projection, where results
are about half of what is reported as correct. Does anyone
knows what is causing it ? </div>
<div><br>
</div>
<div>Just to compare shapely/geopandas yields correct results
using same projections.</div>
<div><br>
</div>
<div>code can be found on this gist: <a
href="https://gist.github.com/rupestre-campos/a82a1403cb47a8153f07c775d7902f50"
moz-do-not-send="true" class="moz-txt-link-freetext">https://gist.github.com/rupestre-campos/a82a1403cb47a8153f07c775d7902f50</a></div>
<div><br>
</div>
<div>the linked scrip outputs <br>
</div>
<div>Area ha farm: 6.0<br>
Area ha calculated (gdal): 3.23<br>
Area ha calculated (geopandas): 6.0</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.</pre>
</body>
</html>