Overpass Turbo's "Repair query" option

I have an Overpass query that tries to find KFC restaurants that are near Hungry Jack’s restaurants. Since I don’t know whether the restaurants will be tagged as nodes or ways, I use nwr:

[timeout:30][out:json][bbox:{{bbox}}];

nwr["name"="KFC"]->.kfc;
nwr["name"="Hungry Jack's"]->.hj;
nwr.kfc(around.hj:200);

out qt;

When I run this query over Sydney, NSW, Australia, it finds a few results:

However there’s one result in particular I’m looking for that it doesn’t find - in Granville, just south of the motorway near Parramatta:

If I zoom in on just this area and run the query again, it shows the “Incomplete Data” popup and offers to repair the query by adding (._;>;); When I do so, the restaurant is shown as expected.

But zooming out to where any of the other restaurants are in the bounding box and running the query (without the repair part), the popup isn’t shown, and that particular restaurant is silently ignored.

What I would have expected to happen is that the prompt is shown as long as there’s at least one result that requires it. As it is, I know to just include this by default from now on so I don’t miss anything.

Here’s my theory as to what’s happening: if a way is the only result, it’ll prompt to repair the query to show the nodes in that way. But if any of the results are already nodes, it won’t show the prompt, and so any way-results are ignored.

Is this a bug with Overpass Turbo, or with my knowledge/expectations?

It helps if you provide a link to the one in Granville.

Link to this place with query @GuardedBear: overpass turbo

1 Like

Ah, sorry. See @Marek-M’s link above.

Not sure if it matters but this KFC is a way and the others seem to be all nodes.

BTW this is the “error” reported by Overpass for the repair query question

This query returned no nodes. In OSM, only nodes contain coordinates. For example, a way cannot be displayed without its nodes.

If this is not what you meant to get, overpass turbo can help you to repair (auto-complete) the query by choosing “repair query” below. Otherwise you can continue to the data.

Edit: Duh, ignore my ramblings its all been said before :blush:

Use [amenity=fast_food] to narrow the search
The named sets aren’t required if using only two of them.
quotation marks aren’t required for single words.
out to geom to return polygons or center to be able to view them when zoomed out.

[bbox:{{bbox}}];
nwr[amenity=fast_food][name="Hungry Jack's"];
nwr[amenity=fast_food][name=KFC](around:200);

//out geom qt;
out center qt;

https://overpass-turbo.eu/s/2wiS

Thanks @DaveF, those are very helpful suggestions that I’ll be sure to implement in future.

However my question remains: why did Overpass only prompt me to repair the query when the way was the only result, and not when there were nodes in the result too?

Here’s a screencast showing the issue:

Peek 2026-09-11 08-25

I know (now) that I can add center to make it work as expected, but without doing that, I’m wondering if this is a bug, as it seems to me the popup should have appeared both times in order to show Granville as a result…

I don’t think it is a bug. The Overpass Turbo code has the comment “show warning/info if only invisible data is returned”. I believe it is intentional that it is triggered only when there is nothing to display on the output map.

I suppose the logic is “an empty map is unusual, so might be a sign the user did not write the query exactly as they intended, so offer something that might fix it”. Note that even in the case of an empty map, this is only a guess. The name and address of the Granville KFC does appear in the Data tab - for some users that might genuinely be what they are looking for.

I think you are suggesting that the message should appear not only when the map is empty, but also if there is any output anywhere in the Data tab that can’t be shown on the Map tab. Maybe there is a case for that, but it would be an enhancement rather than a bug fix.

1 Like