zabop
December 1, 2024, 9:45am
1
I face the following overpass-turbo problem. I zoom in to the area around 39.4083,-76.6654 . There is a way tagged power=line there, way 61592506 . Yet, when I run this query:
[out:json][timeout:25];
way["power"="line"]({{bbox}});
way["power"="minor_line"]({{bbox}});
out body;
>;
out skel qt;
I get:
This map is intentionally left blank. (received empty dataset)
Why don’t I have the power line returned?
ToniE
(Toni Erdmann)
December 1, 2024, 9:49am
2
I’m not an expert on overpass though, but maybe the second way[…] overwrites the result of the first?
What would be the result if you put both way[…] requests in brackets?
2 Likes
zabop
December 1, 2024, 9:52am
3
Thank you, that indeed helped!
[out:json][timeout:25];
(
way["power"="line"]({{bbox}});
way["power"="minor_line"]({{bbox}});
);
out body;
>;
out skel qt;
Here is the returned line:
ToniE
(Toni Erdmann)
December 1, 2024, 9:53am
4
… or have a single
way[‘power’~‘line$’](…)
request matching any power value which ends with ‘line’.
zabop
December 1, 2024, 9:57am
5
Oh that’s clever, I haven’t thought about that. It works . Thanks!
1 Like
DaveF
(Dave F)
December 1, 2024, 3:15pm
6
Personally I prefer to be explicit in routines, using the OR operator (|).
way[power~"(^minor_line|line$)"]
It ensures it doesn’t return other entities you might not want & helps you remember what you were searching for if you want to reuse it 6 months later.
3 Likes