Cleaning up data by properties using Overpass and JOSM
English телендә PlaneMad24 June 2016 баҫылып сыҡты.The problem
A new user accidently added addr:city
and addr:province
tags to a large selection of objects, including rivers and individual nodes.
The user mentioned that the tags were intended only for buildings, so thought I would document the cleanup for future efforts like this.
Finding all the problematic data using Overpass
It is possible to extract all objects with addr:city
added by the particular user using this Overpass query.
Resulting features
This data can be exported into JOSM via remote control for further inspection and cleanup.
Fixing data in JOSM
Once all the data is loaded, we need to select only those objects or features that have been incorrectly tagged with the addr:city
and addr:province
. Since we know that the tags are valid on building ways, we will use a filter to select such tags on anything that is not a building way. We can use the find dialog (ctrl+F or cmd+F) to look for exactly this.
Find all objects tagged with addr:city
and not a building
This selected 3,989 objects from which the tag can be deleted. Just select and delete the tags.
As a bonus got to also cleanup duplicate nodes using the validator.
Upload with a descriptive changeset comment and all done!
Фекер алышыу
Zverikтарафынан24 June 2016 cәғәт 11:07көндө ҡаралған
Actually,
addr:city
tag can be found on address points: nodes without any tags besidesaddr:*
. These are pretty common in Europe and a lot of other countries where detailed imagery for tracing building is not available.maningsтарафынан24 June 2016 cәғәт 12:50көндө ҡаралған
This is obviously wrong in the Philippines. Thanks for fixing @planemad!
jssulapasтарафынан26 June 2016 cәғәт 07:45көндө ҡаралған
This is very helpful. Thanks for saving me!