[gdal-dev] New OGR driver to read OpenStreetMap .osm / .pbf files

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed Jul 18 02:05:01 PDT 2012


Even Rouault <even.rouault <at> mines-paris.org> writes:

> 
> Hi,
> 
> Following the recent brainstorming with Jukka, I've pushed into trunk a driver 
> to read OpenStreetMap .osm / .pbf files .

Driver seems to do what it promises. It is super fast in converting POI data
because it is possible to skip the slower layers (lines, polygons and especially
the tricky multipolygons). Speed with my slow Windows laptop is at least 300000
converted POIs per minute. However, select with SQL feels sub-optimal. It is
much faster to convert all the points than select only a part of those. The
error message suggest that ogr2ogr is inspecting the input file more closely
than necessary for this use case:

ogr2ogr -f "ESRI Shapefile" poitest.shp finland.osm.pbf
-sql "select name, amenity from points where amenity='toilets'" 

ERROR 1: Too many features have accumulated in lines layer. Use OGR_INTERLEAVED_
READING=YES mode

-Jukka Rahkonen-





More information about the gdal-dev mailing list