Find addresses that do not match a nearby street

Everything following in personal capacity, just if the badges cause confusion.

In another thread on an unrelated topic have been proposed from here on and following multiple solutions to find addresses that do not match any nearby street. First please note that there might be a specialized debug tool for this purpose in Nominatim, because it is a major concern of it.

The to my knowledge fastest Overpass query to do this is this one. As a general guide, foreach loops are very expensive because they perform all the steps in the loop body foe each single element. The for instead groups at least by the value of the name tag, performing less than half the number of steps.

A nice improvement to show the suspicious labels could have been

[out:json];
way({{bbox}})[highway][name];
nwr({{bbox}})["addr:street"]->.addr;
for ->.wy(t["name"])
{
  (.addr; - nwr.addr(around.wy:200)(if:t["addr:street"]==wy.val);)->.addr;  
}
.addr out center;
{{style:
node { text:addr:street; }
}}

but unfortunately MapCSS cannot refer to tags that have colons in their key - colon is already a special character there.

We try to workaround this by doing

[out:json];
way({{bbox}})[highway][name];
nwr({{bbox}})["addr:street"]->.addr;
for ->.wy(t["name"])
{
  (.addr; - nwr.addr(around.wy:200)(if:t["addr:street"]==wy.val);)->.addr;  
}
.addr convert pt ::geom=center(geom()),::=::,street=t["addr:street"];
out center;
{{style:
node { text:street; }
}}

and this quite runs, but not on the Overpass-Turbo instance on overpass-turbo.eu .
So please post it on this experimental instance if you want to see the labels. Example:

The rationale why the workaround does not work is that overpass-turbo.eu is based on this library and the necessary pull request to transform labels has been declined.

5 posts - 5 participants

Read full topic


Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/find-addresses-that-do-not-match-a-nearby-street/99633