[gdal-dev] Vector area calculation
ky
rupestre.campos at gmail.com
Fri Jan 10 08:56:49 PST 2025
Hi Even,
Thank's so much for your help! Indeed with this option it yields the
expected result :
Area ha farm: 6.0
Area ha calculated (gdal): 6.0
Area ha calculated (geopandas): 6.0
On Fri, Jan 10, 2025 at 1:52 PM Even Rouault <even.rouault at spatialys.com>
wrote:
> Hi,
>
> I suspect you are running into
> https://gdal.org/en/stable/tutorials/osr_api_tut.html#crs-and-axis-order
>
> Concretely try adding:
>
> source_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER)
>
> at line 34.
>
> Even
>
>
> Le 10/01/2025 à 17:49, ky via gdal-dev a écrit :
>
> Hello all, hope you are well
>
> 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 ?
>
> Just to compare shapely/geopandas yields correct results using same
> projections.
>
> code can be found on this gist:
> https://gist.github.com/rupestre-campos/a82a1403cb47a8153f07c775d7902f50
>
> the linked scrip outputs
> Area ha farm: 6.0
> Area ha calculated (gdal): 3.23
> Area ha calculated (geopandas): 6.0
>
>
>
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250110/baab2470/attachment.htm>
More information about the gdal-dev
mailing list