Hello Peter

Not quite a unit test as such but I guess this demonstrates the issue.

@Test
    public void testWayType()
    {
        OSMWay way = new OSMWay(1);
        way.setTag("highway", "secondary");
        way.setTag("bicycle", "yes");
        long allowed = encoder.acceptWay(way);
        long encoded = encoder.handleWayTags(way, allowed, 0);
        
        TranslationMap trMap = TranslationMapTest.SINGLETON;
        Translation tr = trMap.getWithFallBack(Locale.US);
        InstructionAnnotation annotation = encoder.getAnnotation(encoded, tr);
        assertEquals("road", annotation.getMessage());
    }

And I would’t expect it to be related to that pull request as that seems to be 
more related to selecting speeds.

Sincerely
Stuart Adam
        
On 2 Jun 2015, at 15:23, Peter <[email protected]> wrote:

> Hi Stuart,
> 
> do you have a simple unit test where it shows for which tagging you expect a 
> different behaviour?
> 
> Maybe this is related to:
> https://github.com/graphhopper/graphhopper/pull/421 ?
> 
> Regards,
> Peter
> 
> On 02.06.2015 16:17, Stuart Adam wrote:
>> Hello all
>> 
>> I am starting to look at bike routing and I note in the handleBikeRelated 
>> method in BikeCommonFlagEncoder the following logic applies.
>> 
>>  if (way.hasTag("bicycle", intendedValues))
>>         {
>>             if (isPusingSection && !way.hasTag("bicycle", "designated"))
>>                 wayType = WayType.OTHER_SMALL_WAY;
>>             else
>>                 wayType = WayType.CYCLEWAY;
>>         } else if ("cycleway".equals(highway))
>>             wayType = WayType.CYCLEWAY;
>>         else if (roadValues.contains(highway))
>>             wayType = WayType.ROAD;
>> 
>> 
>> 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.
>> 
>> 
>> Am I correct and if so should this be changed or was there a reason for this 
>> decision in Graphhopper.
>> 
>> Sincerely
>> Stuart Adam
>> 
>> 
>> _______________________________________________
>> GraphHopper mailing list
>> [email protected]
>> https://lists.openstreetmap.org/listinfo/graphhopper
> 
> _______________________________________________
> GraphHopper mailing list
> [email protected]
> https://lists.openstreetmap.org/listinfo/graphhopper

_______________________________________________
GraphHopper mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/graphhopper

Reply via email to