<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>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.<br><br>Sendt fra min iPhone</div><div><br>Den 17. okt. 2015 kl. 00.15 skrev Daniel Patterson <<a href="mailto:daniel@mapbox.com">daniel@mapbox.com</a>>:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div class="">Hi Martin,</div><div class=""><br class=""></div><div class=""> 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`.</div><div class=""> </div><div class="">daniel</div><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 16, 2015, at 1:08 PM, Martin Bang Andersen <<a href="mailto:datscharf@gmail.com" class="">datscharf@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi all,</div><div class=""><br class=""></div>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. <div class=""><br class=""></div><div class="">See for example: </div><div class=""><br class=""></div><div class=""><a href="http://map.project-osrm.org/?z=16¢er=56.176718%2C10.168061&loc=56.176712%2C10.168061&loc=56.177751%2C10.156174&hl=en&ly=&alt=&df=&srv=" class="">http://map.project-osrm.org/?z=16¢er=56.176718%2C10.168061&loc=56.176712%2C10.168061&loc=56.177751%2C10.156174&hl=en&ly=&alt=&df=&srv=</a></div><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">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:</div><div class=""><br class=""></div><div class=""><div class=""><b class="">// If street names stay the same and if we are certain that it is not a</b></div><div class=""><b class=""> // a segment of a roundabout, we skip it.</b></div><div class=""><b class=""> if (data1.name_id == data2.name_id && data1.travel_mode == data2.travel_mode)</b></div><div class=""><b class=""> {</b></div><div class=""><b class=""> // TODO: Here we should also do a small graph exploration to check for</b></div><div class=""><b class=""> // more complex situations</b></div><div class=""><b class=""> if (0 != data1.name_id || m_node_based_graph->GetOutDegree(node_v) <= 2)</b></div><div class=""><b class=""> {</b></div><div class=""><b class=""> return TurnInstruction::NoTurn;</b></div><div class=""><b class=""> }</b></div><div class=""><b class=""> }</b></div></div><div class=""><div class=""><br class=""></div><div class="">but it does not seem to be called during a viaroute request.</div><div class=""><br class=""></div><div class="">Best regards</div><div class="">Martin Bang Andersen</div><div class=""><br class=""></div></div></div>
_______________________________________________<br class="">OSRM-talk mailing list<br class=""><a href="mailto:OSRM-talk@openstreetmap.org" class="">OSRM-talk@openstreetmap.org</a><br class=""><a href="https://lists.openstreetmap.org/listinfo/osrm-talk">https://lists.openstreetmap.org/listinfo/osrm-talk</a><br class=""></div></blockquote></div><br class=""></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>OSRM-talk mailing list</span><br><span><a href="mailto:OSRM-talk@openstreetmap.org">OSRM-talk@openstreetmap.org</a></span><br><span><a href="https://lists.openstreetmap.org/listinfo/osrm-talk">https://lists.openstreetmap.org/listinfo/osrm-talk</a></span><br></div></blockquote></body></html>