NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Is there a way to find the nearest neighboring city with nominatim API?

If so can anybody provide me with a working URL example?

Thank you for your help in advance

asked 02 Dec '21, 10:33

Pepijn%20Moesker's gravatar image

Pepijn Moesker
11223
accept rate: 0%


Use the zoom parameter, example:

https://nominatim.openstreetmap.org/ui/reverse.html?lat=52.114939&lon=4.31488&zoom=10

(The small red circle is the coordinate, the blue circle the found city).

What you can't do with Nominatim: define by city size, e.g. find the nearest city with population > 1 million..

permanent link

answered 02 Dec '21, 11:27

Spiekerooger's gravatar image

Spiekerooger
3.1k22356
accept rate: 16%

edited 02 Dec '21, 11:29

@spiekerooger - I'm looking for the nearest alternative town. So for example my coordinates are in Amsterdam but then I like to get the nearest city outside Amsterdam, lets say Zaandam. Is there a way to accomplish that?

(13 Dec '21, 09:33) Pepijn Moesker

@Pepijn Moesker: That will not be doable with the Nominatim API. This alternative API here: http://geodb-cities-api.wirefreethought.com/docs/api/find-near-location will probably help you out, e.g. "GET /v1/geo/locations/+52.383333+4.9/nearbyCities?limit=5&offset=0&radius=100" has Zaandam as a result.

(13 Dec '21, 13:34) Spiekerooger

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689
×290

question asked: 02 Dec '21, 10:33

question was seen: 2,949 times

last updated: 13 Dec '21, 13:35

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum