<div dir="ltr"><div><div><div><div><div>Hi Daniel,<br><br></div>Thank you for answer<br></div>I understand well the issue here<br><br></div>Would it be acceptable to specify coordinates storage precision in a next release ?<br><br></div>Nevertheless, I got that it won't impact a lot my routing results.<br><br></div>All the best<br><br><div class="gmail_extra">François<br clear="all"></div><div class="gmail_extra">
<br><div class="gmail_quote">2018-02-28 20:37 GMT+01:00 Daniel Patterson <span dir="ltr"><<a href="mailto:daniel@mapbox.com" target="_blank">daniel@mapbox.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi François,<br><br> What you are seeing is rounding error.<br><div><br></div><div> Internally, OSRM only stores the "duration" of each segment, with a resolution of 0.1 seconds. On the map, the speed is calculated by taking the length of the segment, and dividing it by the "duration" value.</div><div><br></div><div> We store longitude/latitude to 6 decimal places, so they have approximately 10cm precision (<a href="https://en.wikipedia.org/wiki/Decimal_degrees" target="_blank">https://en.wikipedia.org/<wbr>wiki/Decimal_degrees</a>) depending on your latitude. This precision means that calculating the length of a segment is limited to +/- approx 10cm precision as well.</div><div><br></div><div> Both of these precision limits compound for short segments when displayed on the map, and sometimes the speed values look weird.</div><div><br></div><div> However, they do not affect route selection very much, because routing is done by accumulating time, and short segments generally only add small amounts of time to the routing decision.</div><div><br></div><div>daniel</div><div><br></div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Feb 28, 2018 at 10:41 AM, François Lacombe <span dir="ltr"><<a href="mailto:fl.infosreseaux@gmail.com" target="_blank">fl.infosreseaux@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div><div>Hi,<br><br></div>While investigating for flaws in a custom profile I'm trying to write, I discovered that arbitrary small ways got strange speed regarding the rules I used.<br><br>Here is an extract from osrm-frontend debug<br><a href="https://imgur.com/a/L8coz" target="_blank">https://imgur.com/a/L8coz</a><br><br></div>All segments on the red line have the same attributes.<br></div>I don't understand why the small parts in the middle got really slower speed than the longer ones.<br></div>Do you have any idea?<br><br></div><div>The purple road with 0km/h speed is normal and expected.<br><br></div><div><br></div>Thank you for any hint<br><br></div>Thanks in advance<span class="m_1278901288176380149HOEnZb"><font color="#888888"><br><br></font></span></div><span class="m_1278901288176380149HOEnZb"><font color="#888888">François<br></font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.or<wbr>g/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.<wbr>org/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div></div>