-
Notifications
You must be signed in to change notification settings - Fork 2
Home
ODP is a simple tool that exposes some of OsmSharp's functionality to act as a CLI tool to process OpenSteetMap-data.
Basic supported features are:
- Reading/writing OSM-XML (.osm).
- Reading/writing OSM-PBF (.osm.pbf).
- Merging multiple sources.
- Creating and writing OsmSharp-routing format file.
- Creating routable shapefiles based on OSM-data.
Basic example converting from OSM-PBF to OSM-XML:
odp --read-pbf somefile.xml.pbf --write-xml somefile.osm
Merge two files together:
odp --read-pbf somefile1.osm.pbf --read-xml somefile2.osm --merge --write-pbf somefilemerged.osm.pbf
Create OsmSharp-routing file from an OSM-XML file, in this case for cars only:
odp --read-pbf someregion.osm.pbf --create-routerdb vehicles=car --contract car --write-routerdb someregion.c.cf.routing
Download the latest release from the release page in this repo or download the daily build here.
All supported switches and options are documented here. A switch basically has an input type and output type. Types can be an input or output file, OSM-data or a router db.
Reads an OSM-XML file and converts to to an OSM-data stream.
- (default): The path to the OSM-XML file to read from.
Example: --read-xml somefile.osm ...
Write an OSM-data stream to and OSM-XML file.
- (default): The path to the OSM-XML file to write to.
Example: ... --write-xml somefile.osm
Reads an OSM-PBF file and converts to to an OSM-data stream.
- (default): The path to the OSM-PBF file to read from.
Example: --read-pbf somefile.osm.pbf ...
Write an OSM-data stream to and OSM-PBF file.
- (default): The path to the OSM-PBF file to write to.
Example: ... --write-pbf somefile.osm.pbf
Creates a routerdb using the current OSM-data stream for the given vehicles.
- vehicles: The vehicles to create the router db for. Any comma-seperated list of vehicles is acceptable in addition to some helpers like
motorvehicles
andall
.
Example: ... --create-routerdb vehicles=all
Writes a routerdb to disk in a format that can be loaded later by OsmSharp or by using --read-routerdb
.
- (default): The file to write the routerdb to.
Example: ... --write-routerdb somefile.routing
Reads a routerdb from disk.
- (default): The file to read the routerdb from.
Example: --read-routerdb somefile.routing ...