I want to set up both osm map and reverse geo code service locally. I am a bit confuse I know for osm map I need to setup postgres and other related tools. How about the nomatim database is it using the same postgre db ? How can I via my java application run a reverse geo code on this database? asked 09 Jun '17, 18:35 newbie14 |
One Answer:
Nominatim data will go into a separate database (called Nominatim comes with a PHP frontend. You'd call http://localhost:8000/nominatim/reverse.php?lat=...&lon= and receive a JSON (or XML) response. Your Java app just calls the URL and doesn't need direct access to the Nominatim database. Example response: http://nominatim.openstreetmap.org/reverse.php?lat=45.514&lon=-122.675 answered 09 Jun '17, 19:54 mtmail |
@mtmail thank you clear a lot of my doubts. Is nominatim data in the form similar to osm then why can we run the reverse process on osm data itself? I got few more doubt like you see for osm I have been trying a lot to install on centos but it just fails so I deciced to go with ubuntu no choice. Is there a proper guide on how best to install nomatim and does it also work best on ubuntu?
Nominatim's database is optimized for geocoding. In case of reverse geocoding for example many parent-child relationships (e.g. state-city) are pre-calculated. The install instructions for the stable Nominatim on Ubuntu 16 are on https://wiki.openstreetmap.org/wiki/Nominatim/Installation The scripts in https://github.com/openstreetmap/Nominatim/tree/master/vagrant use the latest (unstable) version I would avoid them for now. If you run into installation problems add an issue on https://github.com/openstreetmap/Nominatim/issues with the error message.