Hello,
I'm using OSRM with traffic and everything works well. But I wonder, is there any option to "reset" rates for node pairs? For example, if there is a closed road from 1st to 10th of January, then:
id1,id2,speed,rate (set to "don't route there")osrm-customize --segment-speed-file update.csvThank you!
Michal
@mbukovy you would need to do this state handling outside of OSRM. If you preserve the original .osrm.ebg and .osrm.turn_{weight,duration}_penalties and .osrm.geometries files before you run osrm-customize you can always revert back to the "default" by overwriting your updated files.
@TheMarex
But this overwrites the whole graph, right? I need to restore only given nodes and preserve the other, still valid updates (done between 2nd and 10th of January from my example).
So as far as I understand, this is not doable now...?
Edit: I've done this outside of OSRM. I always get the original speeds and rates and save it, so I can restore it whenever I want. Closing the issue.
@mbukovy
And how did you manage to get the original segment speeds?
There is no HTTP api for that :[
@mzervens I have saved all the nodes into sqlite database (exported from OSM data) with original speeds set based on car.lua profile. Therefore I can get original metadata for every node I need, whenever I need.
@mbukovy
Could you explain in more detail how you managed to get the speed data using the car.lua profile file?
As I understand the process:
@mzervens
No no no :-)
When you open car.lua file, you can find the speeds this profile uses while doing osrm-extract. You can see it here https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L139 These speeds are "original" speeds.
So I just used the same speed-map in my own script. I have loaded desired map from geofabrik and created my own database of speeds for every node (based on highway attribute, same as in car.lua file).
Most helpful comment
@mzervens
No no no :-)
When you open car.lua file, you can find the speeds this profile uses while doing osrm-extract. You can see it here https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L139 These speeds are "original" speeds.
So I just used the same speed-map in my own script. I have loaded desired map from geofabrik and created my own database of speeds for every node (based on highway attribute, same as in car.lua file).