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

Hi, considering the following use case, what would be the best way to get the correct result in overpass?

Given a polygon that a user draws on a map, I'm trying to find the places (node[place~"^(city|town|village|hamlet)$"];):

  1. Places (city, town, village, hamlet) inside the polygon
  2. The surrounding place in case the polygon is inside the boundaries of a place
  3. The nearest place in case there are no places inside the polygon and the polygon isn't inside the boundaries of a place

Is there a way to get these results?

Kind regards,

Daniel

asked 09 Jul '20, 18:35

yngwi's gravatar image

yngwi
11112
accept rate: 0%

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:

×483

question asked: 09 Jul '20, 18:35

question was seen: 386 times

last updated: 09 Jul '20, 18:35

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