[postgis-users] Geometries returning zero area with PostGIS 3.1.2.

Marco Boeringa marco at boeringa.demon.nl
Sun Jul 11 03:42:04 PDT 2021


Hi all,

I am running into an issue with two of OpenStreetMap's polygon geomtries 
returning a zero area for the following PostGIS SQL clause:

ST_Area(ST_ConvexHull(ST_Transform(way,4326))::geography,true)

Note that the data was imported using osm2pgsql, with the data stored in 
WGS1984, not Web Mercator.

The two relations that cause the issue are:

https://www.openstreetmap.org/relation/2186646 
<https://www.openstreetmap.org/relation/2186646>

https://www.openstreetmap.org/relation/3394113

One represents "Antarctica", the other the "Ross Dependency".

Note that both relations appear to be quite old (years), and I am 
therefor pretty sure I have processed the exact same geometries 
previously without issues with older versions of PostGIS after planet 
import. Note also that both geometries test as valid with 
"ST_Isvalid(way)" after import using osm2pgsql.

Has something changed in the latest PostGIS 3.1.2 that might explain 
this result, e.g. especially related to the "::geography" cast or the 
"ST_ConvexHull" statement?

Of course, in the way these geometries wrap the globe, they may 
represent a challenge, but as said, I am pretty sure I must have 
processed the same geometries without issues in previous releases of 
PostGIS.

Marco





More information about the postgis-users mailing list