[gdal-dev] New OGR driver to read OpenStreetMap .osm / .pbf files
even.rouault at mines-paris.org
Tue Jul 10 10:23:31 PDT 2012
Following the recent brainstorming with Jukka, I've pushed into trunk a driver
to read OpenStreetMap .osm / .pbf files .
No particularly exotic dependencies : SQLite (and Expat for OSM XML files)
See http://www.gdal.org/ogr/drv_osm.html for the details (will be available in
a few hours).
The performance to convert
http://download.geofabrik.de/osm/europe/finland.osm.pbf into a Spatialite DB is
the following one on my PC (Core i5 @ 2.67 GHz with 64bit GDAL) :
$ time ogr2ogr finland.sqlite finland.osm.pbf -f SQLite -dsco SPATIALITE=YES -gt
10000 -progress --config OGR_SQLITE_SYNCHRONOUS OFF
Testing with larger areas, like whole France or Europe, shows sluggish
performance when ways are built from nodes, but that's perhaps expected. I
didn't compare with other tools to know if the indexing or request strategy is
The data/osmconf.ini configuration file is pretty basic and its settings could
likely be improved with some tweaking. Contributions welcome.
An improved version of the driver could allow specifying custom layers,
instead of the 4 fixed ones.
More information about the gdal-dev