[gdal-dev] New OGR driver to read OpenStreetMap .osm / .pbf files
Jukka Rahkonen
jukka.rahkonen at mmmtike.fi
Thu Jul 19 00:59:01 PDT 2012
Even Rouault <even.rouault <at> mines-paris.org> writes:
>
> Selon Jukka Rahkonen <jukka.rahkonen <at> mmmtike.fi>:
.......
>
> > 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
>
> You can easily transform the above SQL into something equivalent that will
> benefit from the optimization :
>
> ogr2ogr poitest.shp finland.osm.pbf points -select name,amenity -where
> "amenity='toilets'""
Amenity is included in my osmconf.ini and it can be used inside -sql.
However, your example gives me this
ERROR 1: 'amenity' not recognised as an available field.
FAILURE: SetAttributeFilter(amenity='toilets') failed.
-Jukka-
More information about the gdal-dev
mailing list