1

I would like to extract all the cities in Belgium using the overpass API.I used the following query:

area[name="België - Belgique - Belgien"]->.boundaryarea;
(
  node(area.boundaryarea)[place="city"];
);

out;

But got no result. Am I doing something wrong?


This appears to work but I have no idea why

{{geocodeArea:Netherlands}}->.searchArea;
(
nwr["place"="city"](area.searchArea);
);
out body;

1 Answer 1

2

According to https://www.openstreetmap.org/relation/52411 you need to use area[name="België / Belgique / Belgien"], and not as you stated area[name="België - Belgique - Belgien"] (note the typo, the name tag has to match exactly!).

In case case, I would highly recommend to use some more stable identifier instead, e.g. area["ISO3166-1"="BE"][boundary=administrative].

Full query:

area["ISO3166-1"="BE"][boundary=administrative];
node(area)[place="city"];
out body;

Your Answer

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

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