[postgis] How to indentify each polygons' donut polygons in multipolygon
Dave Blasby
dblasby at refractions.net
Tue Dec 18 09:16:47 PST 2001
> Hisaji ONO wrote:
>
> Hi.
>
> I've currently developed GML 2.0 convesion code from PostGIS's WKT.
>
> I've known PostGIS's NumInteriorRings & InteriorRingN function can
> deal with interior rings in polygons. But InteriorRingN function
> seemed to support "single" polygons.
>
> How to identify whether each polygons within
> multipolygon have interior rings or not?
This is, unfortunately, a problem with the OGC spec - its difficult to
directly access anything in a collection (ie. MULTI* or
GEOMETRYCOLLECTION).
Use the GeometryN(geometry,integer) function to get a sub-geometry. Ie.
NumInteriorRings(GeometryN(the_geom, 2))
To find out how many interior rings are in polygon #2.
(the_geom) must be a multi* or geometrycollection.
dave
To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the postgis-users
mailing list