0

I have written the following code filter out some power data in overpass turbo.

[out:json][timeout:1000];
//fetch area "Tokyo" to search in
{{gecodeArea:Tokyo}}->.searchArea;
//gather results
(
  // query part for: "power=tower"
  node["power"="tower"](area.searchArea);
  //query part for: "power=line"
  way["power"="line"](area.searchArea);
  // query part for"power=substation"
  node["power"="substation"](area.searchArea);
);

//print results
out body;
>;
out skel qt;

However I get the following 2 errors,

Error: line 8: parse error: Unknown type "->"

Error: line 8: static error: For the attribute "type" of the element "query" the only allowed values are "node", "way", "relation", "nwr", "nw", "wr", "nr", or "area".

Any ideas what I am doing wrong?

Note to create -> symbol I am using the minus sign and greater than sign from the keyboard.

4

You just had a typo - gecodeArea >> geocodeArea The rest of the query is fine.

https://i.imgur.com/BgtRBu9.jpg

[out:json][timeout:1000];
//fetch area "Tokyo" to search in
{{geocodeArea:Tokyo}}->.searchArea;
//gather results
(
  // query part for: "power=tower"
  node["power"="tower"](area.searchArea);
  //query part for: "power=line"
  way["power"="line"](area.searchArea);
  // query part for"power=substation"
  node["power"="substation"](area.searchArea);
);

//print results
out body;
>;
out skel qt;

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.