Skip to content

Issue RoadClassEncoder via EncodedValueLookup when using mtb and motorway #1843

Closed

Description

@boldtrn

When I set multiple vehicles in the config, including mtb, for example:

graph.flag_encoders: car, mtb

My config looks like this:

graph.encoded_values: road_class,road_class_link,road_environment,max_speed,road_access
graph.bytes_for_flags: 8

If I lookup an encoded value in InstructionsFromEdges via evLookup.getEnumEncodedValue(RoadClass.KEY, RoadClass.class); I get an EncodedValue as expected.

For motorways this seems returns "other" instead of "motorway". Other road classes seem to be fine. If I only use car it works fine.

I cross tested with graph.flag_encoders: car, bike and this particular issue did not exist. I don't think it's necessarily related to the EncodedValueLookup, but that's how I discovered this.

An example route where this happens is this (I think it happens for all motorways): http://localhost:8989/maps/?point=49.303926%2C8.627148&point=49.302688%2C8.626859

Maybe something is wrong with the number of bits reserved by the mtb encoder?

Activity

  1. added this to the 1.0 milestone on Dec 31, 2019
  2. karussell commented on Dec 31, 2019

    @karussell
    Member

    Uh, this looks ugly. Thanks for the report.

    btw: this is no longer necessary: graph.bytes_for_flags: 8

    update: can reproduce this in OSMReaderTest.testRoadClassInfo via adding MountainBikeFlagEncoder

  3. added a commit that references this issue on Dec 31, 2019
    b58cbc4
  4. boldtrn commented on Jan 2, 2020

    @boldtrn
    MemberAuthor

    Thanks for the fast fix 🎉.

    btw: this is no longer necessary: graph.bytes_for_flags: 8

    Thanks, I missed that change!

  5. added a commit that references this issue on Jan 2, 2020
    9e05cf3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions