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

Hello,

I want to get all the shops in London. I tried the query below, but it didn't work. Any help please?

[out:json]; area[name="London"]; node"shop"=*; out center;

Thank you, Catherine

asked 27 Jan '21, 21:54

Katerina_Kourou's gravatar image

Katerina_Kourou
26445
accept rate: 0%


There's a few ways to do this, but behind the scenes they do essentially the same job. Note 'node' won't return all shops so I used 'nwr' (nodes/ways/relations) I use:

rel[boundary][name="Greater London"];
map_to_area;
nwr(area)[shop=car];
out meta center;

shop on its own returns 20mb of data so I restricted it to car shops in this example.

If you want to display the boundary use this:

rel[boundary][name="Greater London"]->.LDN;
.LDN map_to_area;
nwr(area)[shop=car];
out meta center;
way(r.LDN);
out geom;
permanent link

answered 27 Jan '21, 23:27

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

edited 27 Jan '21, 23:28

Thanks Dave. I want though a way to get not only the category "car", but all the categories that are included in the shop. E.g. Supermarket+car+clothes etc..Eveything! Any way to do that please?

(28 Jan '21, 08:05) Katerina_Kourou

Remove '=car' There's a fair bit of info on the wiki such as this page: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_API_by_Example

(30 Jan '21, 23:02) DaveF
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:

×483

question asked: 27 Jan '21, 21:54

question was seen: 1,967 times

last updated: 30 Jan '21, 23:02

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