<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello Peter<div><br></div><div>Not quite a unit test as such but I guess this demonstrates the issue.</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; color: rgb(119, 119, 119);">@Test</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> <span style="color: #931a68">public</span> <span style="color: #931a68">void</span> testWayType()</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> {</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> OSMWay <span style="color: #7e504f">way</span> = <span style="color: #931a68">new</span> OSMWay(1);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> <span style="color: #7e504f">way</span>.setTag(<span style="color: #3933ff">"highway"</span>, <span style="color: #3933ff">"secondary"</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> <span style="color: #7e504f">way</span>.setTag(<span style="color: #3933ff">"bicycle"</span>, <span style="color: #3933ff">"yes"</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> <span style="color: #931a68">long</span> <span style="color: #7e504f">allowed</span> = <span style="color: #0326cc">encoder</span>.acceptWay(<span style="color: #7e504f">way</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> <span style="color: #931a68">long</span> <span style="color: #7e504f">encoded</span> = <span style="color: #0326cc">encoder</span>.handleWayTags(<span style="color: #7e504f">way</span>, <span style="color: #7e504f">allowed</span>, 0);</div><p style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px;"> <br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> TranslationMap <span style="color: #7e504f">trMap</span> = TranslationMapTest.<span style="color: #0326cc">SINGLETON</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> Translation <span style="color: #7e504f">tr</span> = <span style="color: #7e504f">trMap</span>.getWithFallBack(Locale.<span style="color: #0326cc">US</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> InstructionAnnotation <span style="color: #7e504f">annotation</span> = <span style="color: #0326cc">encoder</span>.getAnnotation(<span style="color: #7e504f">encoded</span>, <span style="color: #7e504f">tr</span>);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> assertEquals(<span style="color: #3933ff">"road"</span>, <span style="color: #7e504f">annotation</span>.getMessage());</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"> }</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">And I would’t expect it to be related to that pull request as that seems to be more related to selecting speeds.</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">Sincerely</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;">Stuart Adam</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"><span class="Apple-tab-span" style="white-space:pre"> </span></div><div><div>On 2 Jun 2015, at 15:23, Peter <<a href="mailto:graphhopper@gmx.de">graphhopper@gmx.de</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="moz-cite-prefix">Hi Stuart,<br><br>do you have a simple unit test where it shows for which tagging you expect a different behaviour?<br><br>Maybe this is related to:<br><a class="moz-txt-link-freetext" href="https://github.com/graphhopper/graphhopper/pull/421">https://github.com/graphhopper/graphhopper/pull/421</a><span class="Apple-converted-space"> </span>?<br><br>Regards,<br>Peter<br><br>On 02.06.2015 16:17, Stuart Adam wrote:<br></div><blockquote cite="mid:DUB119-W31E25F0C89FC01BFC0B90FBAB50@phx.gbl" type="cite"><div dir="ltr">Hello all<br><br>I am starting to look at bike routing and I note in the handleBikeRelated method in BikeCommonFlagEncoder the following logic applies.<br><br> if (way.hasTag("bicycle", intendedValues))<br> <span class="Apple-converted-space"> </span>{<br> <span class="Apple-converted-space"> </span>if (isPusingSection && !way.hasTag("bicycle", "designated"))<br> <span class="Apple-converted-space"> </span>wayType = WayType.OTHER_SMALL_WAY;<br> <span class="Apple-converted-space"> </span>else<br> <span class="Apple-converted-space"> </span>wayType = WayType.CYCLEWAY;<br> <span class="Apple-converted-space"> </span>} else if ("cycleway".equals(highway))<br> <span class="Apple-converted-space"> </span>wayType = WayType.CYCLEWAY;<br> <span class="Apple-converted-space"> </span>else if (roadValues.contains(highway))<br> <span class="Apple-converted-space"> </span>wayType = WayType.ROAD;<br><br><br>This does not seem correct to me as from my understanding this is taking the fact that a way has been marked as having a right of way for bicycles (but not a pushing section) then it is a full blown cyclepath. In my mind at least cycleway implies dedicated and marked (normally with differently coloured tarmac) sections which is a much stronger indication for cycle use than just a bicycle right of way.<br><br><br>Am I correct and if so should this be changed or was there a reason for this decision in Graphhopper.<br><br>Sincerely<br>Stuart Adam<br></div><br><fieldset class="mimeAttachmentHeader"></fieldset><br><pre wrap="">_______________________________________________
GraphHopper mailing list
<a class="moz-txt-link-abbreviated" href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openstreetmap.org/listinfo/graphhopper">https://lists.openstreetmap.org/listinfo/graphhopper</a>
</pre></blockquote><br>_______________________________________________<br>GraphHopper mailing list<br><a href="mailto:GraphHopper@openstreetmap.org">GraphHopper@openstreetmap.org</a><br><a href="https://lists.openstreetmap.org/listinfo/graphhopper">https://lists.openstreetmap.org/listinfo/graphhopper</a><br></div></blockquote></div><br></div></body></html>