I'm trying to set up Nominatim database for address geocoding. Database would be used by komoot's Photon, but I guess that's not so important info.
The problem is that the osm xml/pbf files I have contain not just the addresses, but the whole bunch of other things like bars, various offices and so on, which I'm trying to remove.
The idea is to go with something like this 'till I get the desired result set:
osmosis --read-xml us-northeast-latest.osm.bz2 \
--tf reject-nodes landuse=* \
--tf reject-nodes amenity=* \
--tf reject-nodes office=* \
--tf reject-nodes shop=* \
--tf reject-nodes place=house \
--write-xml output.osm
However, after importing the resulting file, I still get those nodes (which should have been excluded) in the search results:
{
properties: {
osm_key: "office",
osm_value: "ngo",
extent: [
-73.9494926,
40.6998938,
-73.9482012,
40.6994192
],
street: "Flushing Avenue",
name: "Public Lab NYC",
state: "New York",
osm_id: 250328718,
osm_type: "W",
housenumber: "630",
postcode: "11206",
city: "New York City",
country: "United States of America"
},
type: "Feature",
geometry: {
type: "Point",
coordinates: [
-73.9490215989286,
40.699639649999995
]
}
}
Note the osm_key and value.
I'm unsure what I'm doing wrong here. Any help would be appreciated.