-
Notifications
You must be signed in to change notification settings - Fork 746
Description
Expected behavior
ST_AreaSpheroid should return the area of geographic polygons on a spheroid. The results should be almost the same as ST_Area with the use_spheroid=true flag from PostGIS, and also almost the same as ST_Area called on projected geometry and scaled by the projection scale.
Actual behavior
In most cases, this works well. However, sometimes, very rarely, the result is incorrect, mainly in the case of more complex geometries. The result is sometimes too low and sometimes too high. The error can even be as high as 75%. I have not found any specific cause or specific features of the geometry that cause problems.
I am attaching a csv file with a few examples of problematic geometries and their areas on the spheroid obtained from sedona and postgis.
geometry_where_elips_elips_area_diff_is_significant_postgis_sed_202601281332.csv
Settings
Sedona version = 1.8.1
Apache Spark version = 3.5
API type = Python
Scala version = 2.12
Python version = 3.10
Environment = Azure