[geos-devel] polar geometry spanning 0-360 lon

David Shean dshean at gmail.com
Tue Mar 11 12:29:15 PDT 2014

Hi list,
I've run into this a few times now, and I'm hoping someone can point me in the right direction.  I primarily use GEOS through the ogr API to work with polar data in either EPSG:3031 or EPSG:3413.  When I work with smaller geometries in these projections, I always convert to WGS84 before performing any operations, and this works well.  However, even this seems to fail for large polygons that span 0-360 around the pole:

g1 = POLYGON ((-45.0 -54.673528789190144,45.00716107726717 -54.669377943743747,135.0 -54.66522770972778,-135.00716107726717 -54.669377943743747,-45.0 -54.673528789190144))
g2 = POLYGON ((-45.0 -54.673528789190144,45.00255773311347 -54.672046393296853,135.0 -54.670564075397799,-135.002557733113463 -54.672046393296853,-45.0 -54.673528789190144))
POLYGON ((3.650402839379899 -54.671285186562592,-45.0 -54.673528789190144,-83.299396823994513 -54.67176254220486,3.650402839379899 -54.671285186562592))

For reference, the EPSG:3031 geom is POLYGON ((-3333500 3333500,3333500 3333500,3333500 -3333500,-3333500 -3333500,-3333500 3333500)).

This looks like a bug to me, but maybe there is a way to specify that the polygon should include minlat -90?  Thanks.

More information about the geos-devel mailing list