Re: [OSRM-talk] Need more instructions

2015-10-17 Thread Emil Tin
The turn instruction flags are computed during extraction but I think Martin is 
talking about the generation of instructions which is in fact done during 
queries.

Sendt fra min iPhone

> Den 17. okt. 2015 kl. 00.15 skrev Daniel Patterson :
> 
> Hi Martin,
> 
>   You're looking at the right code, but it's not used during `viaroute`.  The 
> turn instruction flags are baked into the graph structure that is generated 
> during `osrm-extract`.
>   
> daniel
> 
>> On Oct 16, 2015, at 1:08 PM, Martin Bang Andersen  
>> wrote:
>> 
>> Hi all,
>> 
>> I have previous written about my troubles with missing instructions when a 
>> secondary road has the same name as the primary road, then this 
>> turn/instruction is somehow optimized out of the instruction set. 
>> 
>> See for example: 
>> 
>> http://map.project-osrm.org/?z=16=56.176718%2C10.168061=56.176712%2C10.168061=56.177751%2C10.156174=en
>> 
>> Here the final instruction tells me: "Left onto Haslegårdsvej" and then 
>> after 150m it says destination reached. It does not tell me to turn right 
>> onto the secondary part of Haslegårdsvej after about 100m.
>> 
>> Can anybody point me to the place in the source code where this turn is 
>> removed from the list of instructions? I have looked a lot of places and my 
>> best bet until now is the AnalyzeTurn function in 
>> extractor/edge_based_graph_factory.cpp:
>> 
>> // If street names stay the same and if we are certain that it is not a
>> // a segment of a roundabout, we skip it.
>> if (data1.name_id == data2.name_id && data1.travel_mode == 
>> data2.travel_mode)
>> {
>> // TODO: Here we should also do a small graph exploration to check 
>> for
>> //  more complex situations
>> if (0 != data1.name_id || m_node_based_graph->GetOutDegree(node_v) 
>> <= 2)
>> {
>> return TurnInstruction::NoTurn;
>> }
>> }
>> 
>> but it does not seem to be called during a viaroute request.
>> 
>> Best regards
>> Martin Bang Andersen
>> 
>> ___
>> OSRM-talk mailing list
>> OSRM-talk@openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/osrm-talk
> 
> ___
> OSRM-talk mailing list
> OSRM-talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Need more instructions

2015-10-16 Thread Daniel Patterson
Hi Martin,

  You're looking at the right code, but it's not used during `viaroute`.  The 
turn instruction flags are baked into the graph structure that is generated 
during `osrm-extract`.
  
daniel

> On Oct 16, 2015, at 1:08 PM, Martin Bang Andersen  wrote:
> 
> Hi all,
> 
> I have previous written about my troubles with missing instructions when a 
> secondary road has the same name as the primary road, then this 
> turn/instruction is somehow optimized out of the instruction set. 
> 
> See for example: 
> 
> http://map.project-osrm.org/?z=16=56.176718%2C10.168061=56.176712%2C10.168061=56.177751%2C10.156174=en
>  
> 
> 
> Here the final instruction tells me: "Left onto Haslegårdsvej" and then after 
> 150m it says destination reached. It does not tell me to turn right onto the 
> secondary part of Haslegårdsvej after about 100m.
> 
> Can anybody point me to the place in the source code where this turn is 
> removed from the list of instructions? I have looked a lot of places and my 
> best bet until now is the AnalyzeTurn function in 
> extractor/edge_based_graph_factory.cpp:
> 
> // If street names stay the same and if we are certain that it is not a
> // a segment of a roundabout, we skip it.
> if (data1.name_id == data2.name_id && data1.travel_mode == 
> data2.travel_mode)
> {
> // TODO: Here we should also do a small graph exploration to check for
> //  more complex situations
> if (0 != data1.name_id || m_node_based_graph->GetOutDegree(node_v) <= 
> 2)
> {
> return TurnInstruction::NoTurn;
> }
> }
> 
> but it does not seem to be called during a viaroute request.
> 
> Best regards
> Martin Bang Andersen
> 
> ___
> OSRM-talk mailing list
> OSRM-talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk