Use predefined car but limit max speed

Hi,
i just set up my own graphhopper server and it works great.
Currently i use the following profile-configuration:

profiles:
  - name: car
    vehicle: car
    weighting: shortest

What i would like to do is, use the predefined configuration, but just limit the max speed.
Somthing like:

  - name: car
    vehicle: car
    weighting: shortest
    maxspeed: 100

Of course, i could write the code, but i would prefer to use config-files.
Is this possible?

I would not recommend to use the shortest weighting for car.

Instead use a high distance_influence and then you can also limit the max_speed with a custom profile without any Java code: https://github.com/graphhopper/graphhopper/blob/master/docs/core/profiles.md#custom-profiles

ah, sorry, wrote wrong value.
of course i want to use fastest for weighting.
should i then use the same two options, that you mentioned?

as it’s possible, to set max_speed for different road_classes:
What max_speed is used, when i didn’t set it for a specific road_class in my custom profile?
What happens, if i just set max_speed_fallback without setting max_speed?
Is this value then used for max_speed for any road_class?

should i then use the same two options, that you mentioned?

Sure, you can try it :slight_smile:

What happens, if i just set max_speed_fallback without setting max_speed?

This fallback value is applied for all values where no max_speed value is applied, so if you do not use max_speed then it is used for all road classes.

thx

Powered by Discourse