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

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Thu Jul 19 01:51:46 PDT 2012


Even Rouault wrote:

>> 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.

> Hum, I think I know what's wrong. I see that, even if a subset of layers is
> specified, the attribute filter is applied on all layers, so I suppose that one
> of the lines, polygons or multipolygons layers has no amenity field, right ? You
> could workaround the error by editing osmconf.ini to add that field in all layer
> definitions. But this should be fixed : would you mind opening a ticket about
> that ? Thanks

Adding "amenity" for all the layers really made filter to work and it is fast.
Ticket #4751 created.

-Jukka-


More information about the gdal-dev mailing list