osrm-backend
osrm-backend copied to clipboard
How to extract from_osm_id, to_osm_id, and speed for --segment-speed-file in OSRM?
I’m trying to use osrm-customize with --segment-speed-file to apply custom speeds to OSM road segments. However, I need help extracting the required data (from_osm_id, to_osm_id, and speed) from OSM XML/PBF files. my osm file looks like this:
<way id="486802566" version="1" timestamp="2024-11-12T00:00:00Z">
<nd ref="5317195167"/>
<nd ref="3524650640"/>
<nd ref="5229338522"/>
<nd ref="3085320160"/>
<nd ref="6424292322"/>
<nd ref="4174899249"/>
<nd ref="3419227097"/>
<!-- More nodes... -->
<tag k="highway" v="residential"/>
<tag k="maxspeed" v="30"/>
</way>
What I Need
from_osm_id & to_osm_id:
Should these be consecutive node pairs (e.g., 5317195167 -> 3524650640 ,3524650640 -> 5229338522 ,5229338522 -> 3085320160 ,3085320160 -> 6424292322 ,6424292322 -> 4174899249 ,4174899249 -> 3419227097 ) from the way’s