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

50 results when using Nominatim Reverse Geocoding

3

Hello,

I have simple problem: I am using Nominatim to get the list of pharmacies in London. I always get 50 results, regardless of what I set to limit. Any ideas what I do wrong?

I using such javascript code:

var city = "london";
var object = "pharmacy";
var limit = "10000";
var nomstring = "http://nominatim.openstreetmap.org/search?format=json&q=" + object + "+in+" + city + "&limit=" + limit;
$.getJSON(nomstring, function(result,status)

Thanks!

asked 28 Jul '17, 12:00

marcin%20galazka's gravatar image

marcin galazka
61113
accept rate: 0%


2 Answers:

2

Maximum 50 results is a hardcoded limit in the Nominatim logic for /search. It can't (currently) even be overwritten by a configuration setting on the server.

For a list of POIs considering using the http://overpass-turbo.eu/ tool.

answered 28 Jul '17, 12:37

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

0

Maximum 50 results is a hardcoded limit in the Nominatim logic for /search. It can't (currently) even be overwritten by a configuration setting on the server.

Correct, if you have access to the API files, you can change this. The limit is defined in Geolocate.php on line 100 if ($iLimit > 50) { $iLimit = 50;

Here you can make the limit higher or remove it by removing the if statement (just don't forget to change the elseif after it to if)

I found this file under /usr/local/lib/nominatim/lib-php/

If however your file is not there you can find your path in 'project-folder'/website/search.php: @define('CONST_LibDir', 'PATH DEFINED HERE');

answered 06 May '22, 23:18

ossycraft's gravatar image

ossycraft
11
accept rate: 0%

edited 06 May '22, 23:19

Source code available on GitHub .