[postgis-users] How can I split a polyline?

Fay Du fay.du at versaterm.com
Tue Mar 7 13:01:54 PST 2006


Thanks David, Amit, Robert. Your emails are great help for me. Now I am
working on pgsql to split lines. 

My next question is, after I split a line, how can I keep all attributes
for new lines? The attributes are from clients. Column names and numbers
are random. Can I get column names of a table?

Fay



-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
David Bitner
Sent: Tuesday, March 07, 2006 11:40 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] How can I split a polyline?

There are also the new functions (I am not sure when they were
introduced):
line_substring(geom,float,float)
locate_between_measures(geom,float,float)
that would fit the bill for your first question.

To split into individual points, you would probably want to use a bit
of PL/PGSQL and some loops along with the aforementioned functions.

On 3/7/06, Robert Burgholzer <rburghol at chesapeakebay.net> wrote:
> An possibly:
>
> geometryN(geometry, integer)
>
> for extracting sub-geometries in a true multi-line.
>
> r.b.
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Amit
> Kulkarni
> Sent: Tuesday, March 07, 2006 11:11 AM
> To: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] How can I split a polyline?
>
> Fay,
>
> You might use these functions...
>
> 1) for splitting to lines
>
> NumGeometries(geometry)
> NumPoints(geometry)
>
> 2) to points
> PointN(geometry,integer)
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> 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
>
_______________________________________________
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