This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

Reverse gecoding on planet file on our server, before or after filtering?

0

Newbie here...but I need to understand basics to plan job. As I understand it this Nominatim Reverse geocoding tool depends on the OSM database to assign country, state, town names to X Y locations, by matching them with listed nodes in OSM DB that already have both xy and geography info (right ?) But if we first filter down a planet file on our server to our few million nodes and points that we want (Bridges, Tunnels etc), and THEN apply reverse geocoding, I dont think that will provide a large enough library of OSM data for it to find matching towns. So is it realistic to add this OSM Names dataset of 22 million place names to the file to provide full library? Is 22 million names searched agains 5 million xy s an unrealistic task? I have read about spatial indexing...would it help if we first indexed our data (even within 50 km is fine enough for us .) Is that a huge task in itself, indexing? Thanks.

https://nominatim.org/release-docs/develop/api/Reverse/

https://osmnames.org/download/

asked 01 Jun '19, 21:38

philip's gravatar image

philip
26346
accept rate: 0%

edited 02 Jun '19, 00:34


One Answer:

0

Nominatim 3.3 allows selecting which data you want to import, see http://nominatim.org/release-docs/latest/admin/Import-and-Update/#filtering-imported-data It sounds like you only need 'admin' which includes all places (cities, villiages) and their hierachy (which county, state, country they belong to). It depends on your hardware of course, number of CPU cores, number of parallel API requests you'll run but 5 millions requests should be possible in 1-2 days.

would it help if we first indexed our data

That's not needed. Nominatim's spatial index is global. While sending requests region by region will have a slight performance boost because the database can keep data it recently used in RAM, the extra engineering work isn't worth it.

answered 01 Jun '19, 23:51

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Great. Thank you.

(02 Jun '19, 00:32) philip