Why doesn't this overpass query retun a power line inside bbox?

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?

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

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:

… or have a single

way[‘power’~‘line$’](…)

request matching any power value which ends with ‘line’.

Oh that’s clever, I haven’t thought about that. It works. Thanks!

1 Like

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