Thnx Steve, you are the man :)
I suppose I need to calculate line_start and line_end for both first and
last segment.

On Sun, Jan 11, 2009 at 3:50 PM, Stephen Woodbridge <[email protected]
> wrote:

> bdair2002 wrote:
>
>> 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
>> 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
>> correct,
>> now lets say I want to go from half A to C, now the route display A B and
>> C
>> again.
>>
>> 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?
>>
>> Regards
>>
>
>
> 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
> [email protected]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to