[postgis-users] Re: POLYGON from MULTIPOLYGON

Paul Ramsey pramsey at refractions.net
Wed Nov 15 17:45:11 PST 2006


GeometryN() is what you're looking for.

On 15-Nov-06, at 2:57 PM, Dylan Lorimer wrote:

> Well,
>
> I realize 'Polygonize' isn't the right function, but I'm still  
> stuck figuring out which is correct. Any ideas?
> Cheers,
> dylan
>
> On 11/15/06, Dylan Lorimer <edylan at google.com> wrote: Hi,
>
> I loaded a shapefile of country boundaries into PostGIS using the  
> shp2pgsql loader. I see that the resulting geometry is a  
> multipolygon. I need it as a polygon, and considering there is only  
> a single outer ring, this shouldn't be a problem. But 'Polygonize'  
> is returning a GeometryCollection, rather than Polygon. Any ideas?
>
> gnis2=#  select GeometryType(Polygonize(the_geom)) from  
> gnis_country_view where country_name='Canada';
>     geometrytype
> --------------------
>  GEOMETRYCOLLECTION
> (1 row)
>
> Cheers,
> -dylan
>
>
>
> -- 
> E. Dylan Lorimer | Google Earth Enterprise
> 650.253.2459 (O) | 650.862.6810 (M) | 650.644.0182 (F)
> ---------------------------------------------------------------------- 
> ----------
> Earth Enterprise Support: fusion at google.com | 866.4GO.OGLE ext. 4
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list