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

Direct (without HTTP) request to Nominatim on own server

1

I have server with installed Nominatim. I would like to use it without setting up a website. Is it possible to make direct (without using HTTP) request to Nominatim on own server? What I need to do it? Thank you.

asked 12 Jan '15, 14:09

yaahor's gravatar image

yaahor
61458
accept rate: 0%

edited 12 Jan '15, 14:36


2 Answers:

2

There is a small command line tool ./utils/query.php which you can use to search without using the web interface. It has been written for testing the database, so it is not as powerful as the web API in terms of configuration parameters. It only supports JSON output and no reverse geocoding. But it should provide a good starting point and is easily extendible for your own needs.

answered 12 Jan '15, 16:53

lonvia's gravatar image

lonvia
6.2k25789
accept rate: 40%

2

The Geocoder that extracts information from Nominatim's database is written in PHP, so you could use that library in your code. Alternatively, you could extract the SQL statements the library uses to use in your own library if you want to reimplement it in another language. In either case you would import the OSM data using osm2pgsql in the same way as a full Nominatim installation.

answered 12 Jan '15, 16:02

Jonathan%20Bennett's gravatar image

Jonathan Ben...
8.3k1785108
accept rate: 18%

Source code available on GitHub .