I am building a Nominatim server which will serve as reverse geocoding api server. Only city/state(province)/country information are required in the api result. The street/road level information are not required. For example, the server will give result: http://localhost/nominatim/reverse?lat=43.815031&lon=-79.716834 { city:Brampton; state:Ontario; country:Canada } I would like to use osmosis to filter the data before I import the whole planet data. What command line should I use for this purpose? How about the one below? Thank you. filter relations by administrativeosmosis --read-pbf planet-latest.osm.pbf --tf accept-relations boundary=administrative --used-way --used-node --lp --write-pbf import1.osm.pbf filter ways by administrativeosmosis --read-pbf planet-latest.osm.pbf --tf accept-ways boundary=administrative --used-node --tf reject-relations --lp --write-pbf import2.osm.pbf merge all files togetherosmosis --read-pbf import1.osm.pbf --read-pbf import2.osm.pbf --merge --write-pbf import.osm.pbf
This question is marked "community wiki".
asked 23 Nov '16, 18:48 CQG |
You should also include all nodes/relations with the http://taginfo.openstreetmap.org/keys/?key=place#values Not all values are interesting, try answered 24 Nov '16, 11:08 mtmail Good point. Thank you so much.
(24 Nov '16, 15:54)
CQG
|