[postgis-users] Finding polygones with 'holes' inside

Stephan Holl stephan.holl at intevation.de
Thu Jul 10 05:05:53 PDT 2008


Hi,

I like to accomplish the task of finding polygons with holes inside
(the table is a MULTIPOLYGON). 
I tried to use ST_nrings, but I am not sure it this always only finds
polygons with wholes inside or also islands, which should be also rings
by definition.

So a 

SELECT gid, name FROM table WHERE ST_nrings(the_geom) > 1;

does not only
find whole polygons, but also polygons with more than one polygon.

PostGIS 1.3.3 with PG 8.3.3

Is there an option to identify 'holes' within polygons directly?

Thanks

	Stephan



More information about the postgis-users mailing list