Hey! I have problems, finding supermarkets in a district of a city, using area. I found an example (https://github.com/mapbox/mapping/wiki/Overpass-Guide) which gives me all mountain peaks in the dolomites and tried to adapt it to my needs. Problem is: I can find my desired city (Hamburg) with place=city, but i´m not able to find districts, using borough, suburb or quarter or whatever. I would be so glad, if somebody could help me out! I´m pretty new to this whole thing, and i just want to find supermarkets in districts of hamburg. Maybe ther is even a way better approach? This is my code so far:

*/
[out:json];

area
  [place=city]
  ["name"="Hamburg"];
out body;
// query part
node
  [shop=supermarket]
  (area);
out body;
// outline
relation
  [place=city]
  ["name"="Hamburg"];
>;
out skel qt;

Thank you guys so much! Cheers

asked 08 Jun '17, 08:46

razer969's gravatar image

razer969
31224
accept rate: 0%

edited 08 Jun '17, 08:50

scai's gravatar image

scai ♦
31.2k18281436


Try the Overpass Turbo wizard, type "shop=supermarket in Hamburg" without the quotes in the wizard , zoom to see Hamburg on the map, build query and run query.

permanent link

answered 08 Jun '17, 09:02

nevw's gravatar image

nevw
8.5k2584152
accept rate: 9%

edited 08 Jun '17, 09:07

Hey nevw, thanks for the quick response first of all! Problem is: I want to query a search for a specific district in hamburg. The code I posted above does search for supermarkets in hamburg, but i want to specify that and search only in various districts. I tried using place=district, place=borough and so on (every entry i found in the wiki for place=) but it just doesn´t work. So any help on that end would be greatly appreciated!

(08 Jun '17, 09:11) razer969
1

Can you name an example for such a district?

(08 Jun '17, 09:33) scai ♦

sorry, I don't know the area but this works fine and is suburb? "shop=supermarket in Altona-Altstadt"
I would expect that you could extract those listed here https://wambachers-osm.website/boundaries/

(08 Jun '17, 09:34) nevw

Thanks for the help! I solved the problem using part of the wizard´s code to specify the searching area like this:

(area[admin_level=9]["name"="Eimsbüttel"][boundary=administrative]->.boundaryarea;)

(11 Jun '17, 17:44) razer969
Your answer
toggle preview

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:

×352
×167
×121
×38

question asked: 08 Jun '17, 08:46

question was seen: 3,384 times

last updated: 05 Jul '17, 08:13

powered by OSQA