Skip to content

Creating road network files

Samuel Ridler edited this page Apr 20, 2024 · 4 revisions

JEMSS requires the road network be provided in two csv files for the nodes and arcs. For example, see the nodes.csv and arcs.csv files in JEMSS/data/cities/auckland/models/1/travel/roads/roads.zip.

The road network data we have so far comes from OpenStreetMap. To export OSM data for a new city, go to OpenStreetMap export, if the export is too large then other options are available there such as using the Overpass API. The downloaded file will be a .osm file which requires processing to keep only the relevant roads and to calculate travel times along each arc and save to csv files.

A useful tool in removing non-road objects from the osm file is Osmfilter. The code below (for windows batch file) are to only keep the road objects (named "highways" in osm data).

set input="..\map.osm"
set output="map_highways.osm"
set options=--keep="highway="
osmfilter.exe %input% %options% -o=%output%

Next we need to calculate road arc travel times and write to csv. This is done via script such as this. The section between ## parameters and ## processing in the script has parameters that you will need to set. I have not tested using this script since Julia v1.0 so it is possible that there will be runtime errors.

Clone this wiki locally