[postgis-users] Convert multipolygons to separate polygons

Dane Springmeyer blake at hailmail.net
Tue Aug 19 16:00:02 PDT 2008


Hi Simon,

Yes,

This is one approach:

SELECT ST_PointOnSurface(ST_GeometryN(geometry, generate_series(1,  
ST_NumGeometries(geometry)))) AS single_geometry_turned_into_point
FROM your_table;


Cheers,

Dane


On Aug 19, 2008, at 3:46 PM, Simon O'Malley wrote:

> Hi All
>
> Is there a way to split multipolygons into separate polygon features?
>
> Or is there a way to step through all the polygons in a multipolygon
> and use pointonsurface to create a point for each polygon in the
> multipolygon.
>
> Thanks in advance.
>
> Simon
> _______________________________________________
> 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