The Issue
A common tagging mistake that I’ve encountered a few times is putting the addr:housenumber into the name field. Data of this type tends to be old so it seems the modern tools do a better job keeping this kind of edit from happening. However, when you do find this issue there’s usually a lot of objects to clean up which can be a bother without the right tools.
Finding objects
Here’s the overpass query I’ve used a few times that provides a reasonably stating place:
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“"name"~"^[0-9]" and "building"”
*/
[out:json][timeout:25];
// gather results
(
// query part for: “name~/^[0-9]/ and building”
way["name"~"^[0-9]"]["building"]({{bbox}});
relation["name"~"^[0-9]"]["building"]({{bbox}});
);
// print results
out body;
>;
out skel qt;
Update! User marczoutendijk from the Discord server has provided this overpass query that does a great job finding more instances if this with low noise:
(
node["name"~"^[0-9]+$"]["addr:housenumber"~"^[0-9]+$"]["brand"!~"."]["shop"!~"."]["amenity"!~"."]["highway"!~"."];
);
The Cleanup
The easiest workflow I’ve found it to load the area into JOSM and run a search with some more specificity. Here’s the search for any building way that has a name tag with numbers at the beginning and doesn’t have an addr:housenumber tag:
name~"^[0-9]+" and building=* and type:way and -"addr:housenumber"
Or for names that are up to 3 numbers and nothing more (ex: 7,25,123):
name~"^[0-9]{1,3}" and building=* and type:way and -"addr:housenumber"
Or a name that represents a range of housenumbers (ex: 12-16):
name~"^[0-9]+.[0-9]+" and building=* and type:way and -"addr:housenumber"
Once you have the right set of objects selected, the tag editior will let you rename the “name” tag to “addr:housenumber”. I like to do a spotcheck or values in the name tag to make sure there’s nothing surprising and then the changes can be uploaded.