Why not ask your question on the new OpenStreetMap Community Forum?

Hey, is it possible to add a polygon (for example the shape of a city) in overpass turbo, so that the output only contains data from the city (inside of the polygon)? Can I drag and drop or open a shapefile in overpass turbo for that? Or is there a way to draw one? Thanks for your help!

asked 07 Jun '22, 11:00

milo22948392's gravatar image

accept rate: 0%

Edit: You can't import data into overpass & it doesn't really understand true polygons, just closed ways, but you can use existing OSM data.

There's quite a few ways to achieve this depending on what data you have for the area to be searched:

{{geocodeArea:Greater London}};
rel(pivot)->.Bound; //change to way to render
.Bound out geom;
out center;

These three lines are only to display the search area's boundary & can be removed if desired:

rel(pivot)->.Bound; //change to way to render
.Bound out geom;

The boundary's ID:

rel(175342); map_to_area;
out center;

The IDs for relations start at 3600000000 so by adding the id value to it allows

out center;

Note the different brackets used:

area[name='Greater London'];
out center;
permanent link

answered 07 Jun '22, 14:32

DaveF's gravatar image

accept rate: 16%

edited 07 Jun '22, 15:52

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 07 Jun '22, 11:00

question was seen: 1,144 times

last updated: 07 Jun '22, 15:52

powered by OSQA