Open source questions: Scooter (not working) AND avoiding toll roads

I got Graphhopper Open Source (https://github.com/graphhopper/graphhopper) working on my server, which works fine with car selected as vehicle. My setup is aimed at motorcycles, not bikes or cars.

I’ve encountered a few problems:

  • When adding “Scooter” it states: {“message”:“Vehicle not supported: scooter. Supported are: car”,“hints”:[{“message”:“Vehicle not supported: scooter. Supported are: car”,“details”:“java.lang.IllegalArgumentException”}]}
  • If possible i would like to avoid highways and toll roads, to do so i could ‘ch.disable=true’ option combined with ‘avoid=motorway;toll’ but that option slows the server time down severly.

Question

How can i make scooter function properly and avoid highways and toll roads without getting a slow server response?

Regarding your first question:

My bet would be that you need to update this in your local deployment: https://github.com/graphhopper/graphhopper/blob/master/config-example.yml#L11

Hi Sam and thanks for your quick heads up. This is the first thing i tried and it immediatelly throws an error like:

“scooter is not valid value for this property”

No worries. I’d also check to see if you already have a [country]-gh directory, which holds the cached graph data. If you ran it originally with the car encoder set, and then restarted it with motorcycle, then it won’t have rebuilt the graphs (if my memory serves me correctly anyway - this tripped me up before - but it’s been a long time since I deployed it afresh). I’d take a look in that directory and consider stopping graphhopper, deleting the [country]-gh directory, and then restarting it.

I’d also double check that scooter is defined in DefaultFlagEncoderFactory.java and you’ve fully rebuilt GH.

2 Likes

Hi Sam and thanks again for helping me, much appreciated!

I deleted data-cache before building docker-image. It is a good advice, but it won’t help in our case :frowning:

The codebase only has a scooter icon in it, no coding:

Please help.

I understand the open source platform supports scooter with the extend/adapt CarFlagEncoder. I might have to look at that first.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.