1

I have this query on overpass-turbo:

[out:json][timeout:900];
area["ISO3166-1"="AM"];
node(area)[place~"^(town|city)$"]['name:en'~"^Armavir"];

Now I want to find all restaurant nodes inside Armavirtown so I added

foreach(
  node ["amenity"="restaurant"](area);
  out; 

but the result is an empty element.

[out:json][timeout:900];
area["ISO3166-1"="AM"];
node(area)[place~"^(town|city)$"]['name:en'~"^Armavir"];
foreach(
  node ["amenity"="restaurant"](area);
  out;
);

what is my problem?

I also tried to find relation Id of the city :

[out:json];
area["ISO3166-1"="AM"]->.co;
area[name="Armavir"](area.co)->.city;
rel(area.a)[boundary=administrative][admin_level=5];
out ids; 

to calculate area id and replace this id here area["ISO3166-1"="AM"] but its result is empty.

1 Answer 1

0

It’s data issue: because Armavir is tagged as a node, you can’t use it with area - simply because a node does not describe the exact boundaries of a town.

Try to fix the mapping first, by introducing a way or relation with appropriate tagging, then try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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