Can Graphhopper use my own speed file?

I’m using osm.pbf file as an input file to graphhopper.

I have another data source that gives me the weight(speed or time) of each segment(node to node).

I want graphhopper to use this file as the weight of segments.

I know that osrm has “—segment-speed-file” option; is there something similar to that in graphhopper?

I prefer not to change the code because I’m using a docker image, but if I have to change the code, what should I do?

I have another data source that gives me the weight(speed or time) of each segment(node to node).

Are you sure? Graphhopper ‘segments’ (=edges) are not the same as the OSM ways.

I prefer not to change the code because I’m using a docker image, but if I have to change the code, what should I do?

This is not implemented in the default distribution, so yes you need to write some code for this yourself. You probably want to load the file when the server starts and add your own implementation of the Weighting interface to the weighting factory that returns the speeds from the file.

Powered by Discourse