K
K
kAIST2019-02-12 15:36:42
OpenStreetMap
kAIST, 2019-02-12 15:36:42

OSM. How to do a search for the nearest address from a point?

For one service, you need to automatically fill in the address at the point that the user indicated on the map. We are currently using nominatim.openstreetmap.org. But a problem pops up - the user can point on the map and not to the house, but it is the search for the nearest house that is needed. Is it possible to implement this, preferably without resorting to paid services such as Yandex or Google maps?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2019-02-12
@kAIST

You can upload OSM data to your database with the PostGIS extension (osm2pgsql) and look for the nearest house (ST_DWithin).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question