Skip to content
Ben Abelshausen edited this page May 25, 2015 · 33 revisions

OsmSharpDataProcessor is a simple tool that exposes some of OsmSharp's functionality and that acts as a tool to process OpenSteetMap-data to work better with OsmSharp.

Basic options of the OsmSharpDataProcessor are:

  • Reading/writing OSM-XML (.osm).
  • Reading OSM-PBF (.osm.pbf).
  • Merging multiple sources.
  • Writing to SQLite DB.
  • Writing to Redis DB.
  • Creating and writing OsmSharp-vector format file for rendering.
  • Creating and writing OsmSharp-routing format file.

Usage

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-xml somefilemerged.osm

Create OsmSharp-vector file from an OSM-XML file and a MapCSS file. The cutoffs are zoom-levels that are used to index the data. Use zoom levels in ranges that will be used when viewed.

odp --read-xml somefile.osm --write-scene scene=somefile.map css=somefile.mapcss cutoffs=16,13,10

Create OsmSharp-routing file from an OSM-XML file. Types can be 'simple' meaning that the routing graph will remain as-is while 'contracted' means the routing graph will be optimized and indexed for (mostly) mobile use.

odp --read-xml somefile.osm --write-graph graph=somefile.routing type=contracted

Download

Download the latest release from the release page in this repo or download the daily build here.

Clone this wiki locally