Skip to content

Lack of documentation on curbside and turn costs #2033

Closed

Description

@NoamDev

When trying to use curbside parameter I get an error claims I have to enable turn costs for the profile.
After doing that, I get another error:

The profile 'car' was configured with 'turn_costs=true', but the corresponding vehicle 'car' does not support turn costs.
You need to add `|turn_costs=true` to the vehicle in `graph.flag_encoders`

The isn't very helpful when using the open source engine with java.

  1. What am I supposed to do?

  2. This requires documentation.

Activity

  1. NoamDev commented on May 12, 2020

    @NoamDev
    Author

    The documentation and error message are targeted only those who use a config file....

  2. karussell commented on May 12, 2020

    @karussell
    Member

    Isn't this helpful :) ?

    You need to add |turn_costs=true to the vehicle in graph.flag_encoders

    ->

    graph.flag_encoders=car|turn_costs=true

    btw: we know this is far from optimal to require this in both locations. We'll likely improve this for 2.0.

  3. NoamDev commented on May 12, 2020

    @NoamDev
    Author

    graph.flag_encoders=car|turn_costs=true

    Where am I supposed to write this line?
    Am I supposed to write it in some config.yml file I don't have? 😐

  4. NoamDev commented on May 12, 2020

    @NoamDev
    Author

    Currently I define flag encoders with the following line:
    hopper.setEncodingManager(EncodingManager.create("car,foot"));

  5. karussell commented on May 12, 2020

    @karussell
    Member

    In Java you should be able to do the same:

    hopper.setEncodingManager(EncodingManager.create("car|turn_costs=true,foot"));
    // or better:
    hopper.setEncodingManager(new EncodingManager.Builder().add(new CarFlagEncoder(5, 5, 1), new FootFlagEncoder()));

    (it wouldn't make sense to support both environments in the exception "Java lib" & "Server". So we decided to print the help for the most common which is using GraphHopper as server that has a config.yml)

  6. NoamDev commented on May 12, 2020

    @NoamDev
    Author

    Thank you!
    I agree you can't make the excpetion too long.
    In that case I for one would search in the docs.
    If that explanation you gave me would be included in the docs of turn costs it would be great!

  7. added a commit that references this issue on Sep 28, 2021
    e99b2e0
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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions