[postgis-users] Segements and Routing
bdair2002 at gmail.com
Mon Jan 12 00:20:39 PST 2009
Thnx Steve, you are the man :)
I suppose I need to calculate line_start and line_end for both first and
On Sun, Jan 11, 2009 at 3:50 PM, Stephen Woodbridge <woodbri at swoodbridge.com
> bdair2002 wrote:
>> Hello, I am using POSGIS with Pgrouting, I noticed that the route deals
>> segments (either it takes the full segments or ignore it). Lets say I have
>> segments A B & C , A and C are connected through B.
>> And I want to go from A to C, the routing result is A B C which is
>> now lets say I want to go from half A to C, now the route display A B and
>> So My question is, Is it possible to make the route from the exact start
>> point (Half A, or from the first Quarter of A) to the exact end point? Is
>> there any function which takes the x1,y1 for segment A and a LonLat on the
>> same segment and return me the partial geometry of A?
> pct := line_locate_point(line, pnt);
> line_start := line_substring(line, 0, pct);
> line_end := line substring(line, pct, 1.0);
> These should do what you want.
> -Steve W.
> http://imaptools.com/leaddog/routing/dd.html My routing Demo page.
> postgis-users mailing list
> postgis-users at postgis.refractions.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the postgis-users