[postgis-users] MultiLineString to Point Geometry

Steffen Macke sdteffen at gmail.com
Mon Jan 30 04:48:14 PST 2006


Hi İzzet

maybe the following example will help you:

select astext(pointn('MULTILINESTRING((1 1,0 0))', generate_series(1,
numpoints('MULTILINESTRING((1 1,0 0))'))))

However, this will only work for the first linestring in the multilinestring.
If you want support for the other linestrings, you'll have to used
another generate_series() over numgeometries() and geometryn to
extract the individual linestrings.

Regards,

Steffen


More information about the postgis-users mailing list