[pgrouting-users] implement directions

Stephen Woodbridge woodbri at swoodbridge.com
Tue Jul 31 09:27:19 PDT 2012


On 7/31/2012 11:12 AM, Pedro Costa wrote:
>
> I'm confused.
>
> How i evalute the bearing for every intersection?There is a lot of
> possibilities by point right?

Sorry for the crude character graphics:

       c  d
        \ |
         \|
a--------b-------e
          |\
          | -----f
         /
        g

Consider this complex intersections with lots of spokes. If your route 
is from a-b to one of the spokes and you need to get the edge b-? then 
compute the heading. But if a-b and b-? have the same name then you can 
compress these to edges into one virtual edge a-b-?, if the name changes 
at the intersection then you need to compute the turn maneuver.

You will have to write a stored procedure to do this. Because the number 
of edges in will not be the number of maneuvers out because you want to 
compress edges with the same name other wise you will have in directions 
like:

continue on main st
continue on main st
continue on main st
continue on main st
continue on main st
continue on main st
turn right on foo st
etc

-Steve

> Em 31-07-2012 16:03, Pedro Costa escreveu:
>> Em 31-07-2012 15:50, Stephen Woodbridge escreveu:
>>> You have to evaluate it at every intersection
>>
>>
>> ok thanks. But with the table 'vertices_tmp'?
>>
>> May be when i finished this i can post in the wiki because we don't
>> have code about this...
>>
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users



More information about the Pgrouting-users mailing list