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- _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev