[postgis-users] Segements and Routing
woodbri at swoodbridge.com
Sun Jan 11 05:50:26 PST 2009
> Hello, I am using POSGIS with Pgrouting, I noticed that the route deals with
> segments (either it takes the full segments or ignore it). Lets say I have
> 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 correct,
> now lets say I want to go from half A to C, now the route display A B and C
> 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.
http://imaptools.com/leaddog/routing/dd.html My routing Demo page.
More information about the postgis-users