[postgis-devel] [PostGIS] #1046: Invalid geography polygons: BOOM! Could not generate outside point!

PostGIS trac at osgeo.org
Tue Jun 21 02:50:02 PDT 2011


#1046: Invalid geography polygons: BOOM! Could not generate outside point!
----------------------------+-----------------------------------------------
 Reporter:  mwtoews         |       Owner:  pramsey      
     Type:  defect          |      Status:  new          
 Priority:  medium          |   Milestone:  PostGIS 2.0.0
Component:  postgis         |     Version:  1.5.X        
 Keywords:  geography boom  |  
----------------------------+-----------------------------------------------
 I've seen a few "BOOM" errors over the past few months (e.g.,
 [http://comments.gmane.org/gmane.comp.gis.postgis/27073
 1][http://gis.stackexchange.com/questions/9217/postgis-certain-
 multipolygons-cause-boom-could-not-generate-outside-point 2]). For
 example, with PostGIS SVN r7443:
 {{{
 SELECT ST_Intersects('POINT(160 43)'::geography, 'POLYGON((0 0, 0 90, 180
 90, 180 0, 0 0))'::geography);

 SELECT ST_Area('POLYGON((0 0, 0 90, 180 90, 180 0, 0 0))'::geography);
 }}}

 The error comes from
 [http://trac.osgeo.org/postgis/browser/trunk/liblwgeom/lwgeodetic.c#L1346
 liblwgeom/lwgeodetic.c], with the famous last words [comments] "This
 should never happen".

 Note, the above geography polygon does not make any sense to the
 [http://www.gcmap.com/mapui?P=W0+N0-W0+N90-W180+N90-W180+N0-W0+N0&DU=m
 Great Circle Mapper]. I can think up many more invalid geography polygons
 that produce the same "BOOM" error.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1046>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list