Friday, 12 August 2016

PostGIS ERROR: BOOM! Could not generate outside point!


This may be a continuation of a closed thread.


I want to sum the areas of polygons over categories in a large data set (avian species ranges), like this:



select sciname,
sum(ST_Area(the_geom::geography)) / 1000000 as km2
from gis.aviandists_pl
group by sciname
order by sciname;

Some rows trigger 'ERROR: BOOM! Could not generate outside point!'. I've isolated a row that is causing this problem, but haven't found a way to upload it here. Based on the thread linked to above, I thought it might be a globe-spanning polygon, but it doesn't appear that way (see image below). This represents a single row from a geometry table, which surprises me because I would have thought that the multiple polygons that I'm observing would have to be represented by multiple records. Could this actually be a global polygon with small holes? More importantly, how can I work around this? The query covers over 10k rows, and I have no idea how many may pose this problem or how to find them. I'd be happy to share a shapefile of the problem data if that would help, but I haven't found a way to attach one here.


screen capture




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...