0

I would like to know how to query for an example all the amenities that are named Deutsche bank in a city named Berlin in Germany. Below is my attempt.

Furthermore, please let me know the meaning of the following sign

<  >

Code:

{{geocodeArea:Germany}}->.searchArea;
(
  nwr(area.searchArea)["amenity"="bank"];
  >;
  nwr(area.searchArea)["brand"="Deutsche Bank"];
  >;
  nwr(area.searchArea)["atm"="yes"];
  >;
  nwr(area.searchArea)["addr:city"="Potsdam"];
  
);
out;
1

You perform several individual queries where the results have to match just one of your requirements. However according to your description they should match all of them. So you have to combine the required tags.

Try the following query:

[out:json][timeout:60];
(
  {{geocodeArea:Berlin}}->.searchArea;
  nwr(area.searchArea)["amenity"="bank"]["brand"="Deutsche Bank"];
);
out body;
>;
out skel qt;

For the meaning of the >; and <; statements see Overpass QL. They perform a recurse up and recurse down, respectively..

2
  • can you please show me how to show only ways in the same query??i do not want to display the nodes – LetsamrIt Mar 5 at 6:10
  • I'm not sure if I understand you correctly. You can replace nwr with way to omit nodes and relations. This will lead to fewer results, however. – scai Mar 5 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.