Bike profile error


Can anyone make sense of the error below?

java.lang.IllegalStateException: Calculating time should not require to read speed from edge in wrong direction. (48436 - 31818) (47.36425796220283,8.510880921279213), (47.36414955625272,8.511599902322887), dist: 55.476 Reverse:false, fwd:false, bwd:false, fwd-speed: 0.0, bwd-speed: 0.0

When I run the map matching on the same trace but with profile ‘car’, it works fine.


This error should only come up if something went wrong. Can you share the GH version, config.yml and did you do any modifications of the GH code?

I am using GH version 3.0 and I haven’t modified the code. I have attached screenshots of the parts of the config file that I changed to include the bike profile

(is there a way to attach the file directly?)

And can you also share which map you were using (datareader.file) and the map-matching query / gpx points? There is an upload icon above the message box, or you could copy&paste your text files or upload them as e.g. gist to github and share the link here.

Yes of course! The query:

java -jar web/target/graphhopper-web-3.0-SNAPSHOT.jar match --file config-example.yml --profile bike web/src/test/resources/gpx_legs_full/bike_leg_82.gpx

The gpx trace is attached, along with a screenshot of the corresponding csv file containing the original coordinates. The map I am using is an OSM of the greater Zürich area (not sure what the datareader.file is :/)


bike_leg_82.gpx (4.7 KB)

When you installed GraphHopper did you specify switzerland as PBF file? (-Ddw.graphhopper.datareader.file=...) See

And we would need the exact link to this file, so that we can try to reproduce this problem and see where the problem is.

Hi, yes I did. Within the following link you can find my config file, the xml file, and the gpx file. I would really appreciate the help as I am also not able to figure out why it doesn’t work.

I can reproduce this error. We’ll have to investigate. I opened a ticket here:

I just fixed this problem. Can you please try with recent master again? Another workaround would be either changing the order of the profiles (bike before car), or skipping the car profile in the config entirely. In any case before my fix you could only use the first of the two profiles with the map matching command. Using the GH server’s /match endpoint via http should also work.

1 Like

Yes, it works with the recent master! Thank you so much.