[postgis-users] row-wise geometry intersecting

Brent Fraser bfraser at geoanalytic.com
Tue Jun 12 10:52:45 PDT 2012


Hi All,

I've got a table (a view actually) with two multipolygon geometry 
columns: wkb_geom_extent and wkb_geom_digitized.

They contain polygons representing the footprint of images and the areas 
digitized in the  images.

So the view looks like:
v_images
image_id:    wkb_geom_extent:    wkb_geom_digitized:
1                   xxxxx          xxxx
2                   xxxxx
3                   xxxxxx         xxxxx


I want to calculate the area digitized in each of the images and since 
some of the polygons representing the area digitized could have be 
sloppily defined to extend outside of the image footprint , I thought I 
would intersect the two geometries:

SELECT image_id, ST_Intersection(wkb_geom_extent, wkb_geom_digitized) as 
image_area FROM v _images

but I get an error:

NOTICE:  TopologyException: side location conflict at -17.2242 79.1865
ERROR:  GEOS Intersection() threw an error!
********** Error **********
ERROR: GEOS Intersection() threw an error!
SQL state: XX000

This may be due to some problems in my geometries, but I thought I would 
check to see if my query was reasonable...

Thanks!

-- 
Best Regards,
Brent Fraser





More information about the postgis-users mailing list