Interesting. Any reason you wrote the whole thing yourself instead of basing it on the Osmium library? (wiki.osm.org/wiki/Osmium)
Jochen On Tue, Jul 10, 2012 at 09:18:10PM +0200, Even Rouault wrote: > Date: Tue, 10 Jul 2012 21:18:10 +0200 > From: Even Rouault <[email protected]> > To: [email protected] > Subject: [OSM-dev] New OGR driver to read OpenStreetMap .osm / .pbf files > > Hi, > > This is a forward of an email I just send on the gdal dev mailing list : > > 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 > > real 4m31.194s > user 3m33.020s > sys 0m46.070s > > 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 > particularly bad. > > 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. > > Happy testing, > > Even > > PS: I'm not sure if this is the right list @openstreetmap.org for that kind > of > news. > > _______________________________________________ > dev mailing list > [email protected] > http://lists.openstreetmap.org/listinfo/dev > -- Jochen Topf [email protected] http://www.remote.org/jochen/ +49-721-388298 _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

