Skip to content

Instantly share code, notes, and snippets.

@karussell
Last active March 11, 2019 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karussell/2fa551a9fbe8e970ac5d1e874a04a46f to your computer and use it in GitHub Desktop.
Save karussell/2fa551a9fbe8e970ac5d1e874a04a46f to your computer and use it in GitHub Desktop.
# Use branch https://github.com/graphhopper/graphhopper/tree/flex_vehicleprofile
# See discussion https://discuss.graphhopper.com/t/flexible-vehicle-profiles/3612
######################################################
http://localhost:8989/maps/?point=51.037751%2C13.728061&point=51.047384%2C13.741236&locale=en&vehicle=foot
foot but avoid primary roads
######################################################
base: foot
max_speed: 6
no_access:
road_class:
- primary
# too simplistic wheelchair!
base: foot
max_speed: 8
no_access:
road_class:
- steps
factor:
surface:
cobblestone: 10
######################################################
http://localhost:8989/maps/?point=51.062922%2C13.73909&point=51.066347%2C13.687763&vehicle=car
######################################################
base: car
max_speed: 120
no_access:
road_environment:
- bridge
######################################################
http://localhost:8989/maps/?point=51.054722%2C13.338175&point=51.055099%2C13.732052&locale=en&vehicle=car
use 1, 2, 3 to see differences
######################################################
base: car
max_speed: 120
factor:
road_class:
motorway: 3
# scripting! show longer route
base: car
max_speed: 120
script: '(edge.get(road_class) == RoadClass.MOTORWAY) ? 3 : 1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment