[postgis-users] Convert multipolygons to separate polygons

Simon O'Malley simonom at gmail.com
Tue Aug 19 16:53:13 PDT 2008


Hi Mike, Dane

Thanks for your responses. Dump worked a treat.

Teach me for not RTFM'ing.

Simon

On Wed, Aug 20, 2008 at 11:00 AM, Dane Springmeyer <blake at hailmail.net> wrote:
> 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
>
> _______________________________________________
> 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