3

While browsing https://github.com/graphhopper/directions-api/blob/master/docs-routing.md I found the option to choose one of the preset vehicle types car, foot and bike. But unfortunately I have to calculate the duration based on vehicles with caped maximum speed (slower than a car and faster than a bike) which are also not allowed to drive on interstates.

What is the best approach to make something like this work?

Karussell
  • 17,085
  • 16
  • 97
  • 197
Haves
  • 152
  • 1
  • 9

1 Answers1

3

You can use an existing standard profile like car and reduce the speed profile and adjust the allowed highway tags. E.g. look into the CarFlagEncoder. Another (currently more complex) solution is to write a custom FlagEncoder from scratch.

Karussell
  • 17,085
  • 16
  • 97
  • 197
  • 1
    Thanks. This was exactly what I was looking for. I now also found it here [link](https://github.com/graphhopper/graphhopper/blob/master/docs/index.md) which I did not identify as what I was searching for. I will try to make a pull request for the documentation to avoid questions like mine in the future (if this is okay). – Haves Mar 09 '15 at 12:24