[postgis-users] Split multi-linestrings

Fred Lehodey lehodey at gmail.com
Wed Aug 19 06:32:22 PDT 2009


Hi Ben,
I'am not sure to understand...
Have you tried something like that ?

SELECT *, (ST_DUMP(the_geom)).geom  AS the_geom FROM your_table

Fred



On Wed, Aug 19, 2009 at 2:11 PM, Ben Madin <ben at remoteinformation.com.au>wrote:

> Thanks Fred,
> I have also had this problem, but I don't understand how to handle the
> 'set' that is returned.
>
> I don't seem to be able to split out each LINESTRING into its own row. Is
> there a way to do this or handle the 'set' output?
>
> (It may just be incorrect programming on my part, but I have tried all the
> examples from the documents, and get a geometry 'set' - I just can't do
> anything with it!)
>
> cheers
>
> Ben
>
>
>
>
> On 19/08/2009, at 6:54 PM, Fred Lehodey wrote:
>
> Hi Andrea,
> Have a look to ST_Dump
> http://postgis.refractions.net/docs/ST_Dump.html
>
> Fred
>
>
> On Wed, Aug 19, 2009 at 11:50 AM, Andrea Peri <aperi2007 at gmail.com> wrote:
>
>> Hi,
>>
>> I have some troubles try-ing to split from a MultiLineString to
>> LineStrings.
>>
>> I try this code with postgis 1.4.0:
>>
>> ST_GeometryN(geom,generate_series(1,ST_NumGeometries(geom)))
>>
>> But it return all LineStrings as simple segments with 2 only vertexs.
>>
>> It seem the ST_NumGeometries(geom) return the count of all segments , not
>> the parts.
>>
>> There a function that count the num of parts ?
>>
>> Many thx,
>>
>> Andrea Peri
>>
>>
>>
>> _______________________________________________
>> 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
>
>
> --
>
> Ben Madin
> REMOTE INFORMATION
>
> t : +61 8 9192 5455
> f : +61 8 9192 5535
> m : 0448 887 220
> Broome   WA   6725
>
> ben at remoteinformation.com.au
>
>
>
> Out here, it pays to know...
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090819/d39beb6d/attachment.html>


More information about the postgis-users mailing list