I invite you to try a planned feature for 1.0 which is now in a usable shape. It allows you to heavily customize the existing vehicle profiles without any Java knowledge. And not only per-request but also for the CH and LM preparations.
Cargo bike example:
base: bike vehicle_height: 2.3 vehicle_width: 1.2 # let's assume cargo bikes are e-bikes and we should lower speed to prefer shorter and not faster routes automatically max_speed: road_class: primary: 28 # if no other condition matches max_speed_fallback: 25 priority: # exclude steps road_class: steps: 0 surface: sand: 0.5 # prefer better tracks track_type: { other: 1.1, grade1: 1.1 } # prefer official bike routes bike_network: { other: 0.5 } # avoid all situations where we have to get off the bike get_off_bike: 0.5
As you can see from the examples there are already several things implemented:
- avoid, prefer or block roads with with a certain road_class (motorway, primary), surface, track_type, road_access (destination, …), road_environment (tunnel, bridge), toll, bike or hike network etc
- define maximum vehicle properties like for speed, length, weight, height and width
- lower the average speed via a speed_factor i.e. influence the time!
- cap maximum speed (also influences the time!)
- avoid, prefer or block areas via GeoJSON or also change speed or cap speed based on these areas.
- avoid, prefer or block countries also works if issue 1875 is fixed (usage: add
country
encoded value and set border_directory) - change distance influence to prefer shorter but potentially slower routes
As there is no documentation except the PR itself and the tests I would appreciate your feedback about the usage and what is unclear or even your first custom profiles .
from Hacker News https://ift.tt/37sFHSr
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.