<div dir="ltr"><div>Hi Even, <br><br></div><div>Thank's so much for your help! Indeed with this option it yields the expected result :<br></div><div><br></div><div>Area ha farm: 6.0<br>Area ha calculated (gdal): 6.0<br>Area ha calculated (geopandas): 6.0</div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Jan 10, 2025 at 1:52 PM 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>
<p>Hi,</p>
<p>I suspect you are running into
<a href="https://gdal.org/en/stable/tutorials/osr_api_tut.html#crs-and-axis-order" target="_blank">https://gdal.org/en/stable/tutorials/osr_api_tut.html#crs-and-axis-order</a></p>
<p>Concretely try adding:</p>
<p><span>source_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)</span></p>
<p><span>at line 34.</span></p>
<p><span>Even<br>
</span></p>
<p><span><br>
</span></p>
<div>Le 10/01/2025 à 17:49, ky via gdal-dev
a écrit :<br>
</div>
<blockquote type="cite">
<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" target="_blank">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></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<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.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.</pre>
</div>
</blockquote></div>