Geographic Information Systems Asked by Alexis Huxley on July 17, 2021
I’m trying to apply an additional filter to the results set from an overpass query by simply uncommenting one line, but when I uncomment that line it has no effect and I don’t understand why or how to fix it.
Here’s the code:
[out:json][timeout:60][bbox:{{bbox}}];
// uncomment this line to further filter
//{{geocodeArea:Augsburg}}->._;
node["tourism"="camp_site"];
out;
way["tourism"="camp_site"];
out center;
relation["tourism"="camp_site"];
out center;
It’s line 4 (the geocodeArea
line) that I want to uncomment or leave commented out. Here’s a link to the script on overpass. Uncommenting line 4 and rerunning the query does not restrict the results.
I realise that I can change line 4 to save the search area into a named result set with:
{{geocodeArea:Augsburg}}->.nameOfMySearchArea;
and that does work but has disadvantages:
I would need to specify the search area’s name on the end of all my node
, way
and relation
lines and I’m trying to keep the changes to flip this filter in and out to an absolute minimum (this is important for the intended users).
If I were then to comment out line 4 again, in order to not further filter the results, then it breaks the script and I can find no way to define the search area to something that would not further filter the results. E.g. this does not work:
({{bbox}})->.nameOfMySearchArea;
(Nor a whole load of other things I googled and tried.)
Can anybody advise why the commenting/uncommenting has no effect and what the fix is?
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP