Hi guys, Is it possible to slim down a planet .pbf file to only contain Country/City/State names to be used for simple reverse geocoding purposes only? Any pointers or help will be appreciated. asked 16 Dec '17, 20:39 cbyter edited 16 Dec '17, 20:46 |
One Answer:
You haven't mentioned a specific geocoder, so I assume you plan to write your own implementation, e.g. using a full-text search engine. https://wiki.openstreetmap.org/wiki/Osmfilter allows you to extract only the places you want. Start with a small geographic area (e.g. one country) first. Look for answered 16 Dec '17, 22:24 mtmail |
Thanks for the response. I plan on using nominatim, does that change the answer at all?
No, Nominatim is a good choice. It will take care of linking cities to countries, handling all languages, abbreviations. It can't do spell-checking and can't incomplete search terms (type-ahead/autocomplete like search). Nominatim uses https://github.com/openstreetmap/osm2pgsql/blob/master/output-gazetteer.cpp during the import (utils/setup.php) and it might give you some hints on tags. For type-ahead have a look at http://photon.komoot.de/