I want to remove tags added in Changeset: 25707262 | OpenStreetMap - with consent of its author - but regular revert will not work, too many conflicts appeared.
Or at least I failed.
Is there some way to remove specifically added tags? That building=dam ?
I do not want to mass remove all building=dam for obvious reasons, only ones added in this edit
I don’t think “reverting” is the correct approach for something like this, an automated/scripted edit to objects that were changed in that CS and still have building=dam is what I would do. Depending on how many objects are actually still affected it may be possible to simply do it in your fav editor (but you naturally already know that).
I would limit the use of “revert” to reverting :-) the state of an object to its exact prior state, it’s only terminology, but it is IMHO already confusing enough as it is (and I know we all have misused this, not singingly you out).
If you can compose an Overpass query that will exactly select the objects that you want to remove a tag from, run that query from JOSM and select the data there. You can remove the tag from all selected objects at once. Be careful when selecting, as when you find a way with Overpass JOSM will (of course) download all the nodes, and you only want to remove the tag on the way. If the objects to edit are widely spread it makes sense to repeat this process in smaller geographical areas.
If you can’t compose an Overpass query that will exactly select the objects that you want, then get that list from some other method such as user_changesets.pl from the perl scripts to download all this users’ changesets back to a date and grep. You’ll need to run that script from the context of a logged-in user to avoid rate limits. Once you’ve identified the objects to change, call undo.pl several times from a script to undo the undesired changes. By default that won’t change an object if there have been subsequent changes, so you’ll need to watch for errors from that script and manually make the remainder of those changes in JOSM. Again, don’t try to do them all at once - run in smaller batches to keep changesets geographically smaller and spot problems earlier.
I have the better-osm-org extension installed, highlighting the changes in the changeset. It takes just 1-2 minutes to make sure that the ‘building=dam’ tag was actually added on all the objects touched in the changeset.
Then I go to JOSM and revert this changeset - and undo the revert immediately. I now have all the objects from this changeset in their current version in the editor and can easily remove the tag and upload without conflicts.
It’s a hack to download all the ways in the changeset without using overpass or similar. You would then need to select the relevant ways with a filter/search expression (that is trivial), and then actually make the change.
I’ve (re-)mapped quite a few dams and the general impression that I get is that many smaller dams that are used for water storage / supply are just simple dams - structures holding back the water. Any associated buildings are completely separate structures.
However, larger dams and in particular hydro-electric dams often have the generating hall or other spaces attached to the dam as one structure. Any changes to OSM need to account for this. While building=dam is probably not the best tag, there may be merit in having some way of accounting for such structures.
Of course, many larger dams have inspection galleries (tunnels / passageways). While these are enclosed spaces with floors, walls and ceilings, they are for inspection and maintenance and not part of the primary function of the dam, they are not useable rooms and the dams can’t be described as buildings.
Comments from Mateusz Konieczny 5 months ago: Changeset: 25707262 | OpenStreetMap “Mass adding building=dam to all waterway=dam is wrong, incorrect and unique to Turkey. (and China)”
They also seem to be present in:
Europe: Austria, Belgium, France, Germany, Greece, Hungary, Italy, Spain (some in each).
West Africa (1 instance).
Western, central and south-east Asia (quite a few).
The best way forward might be manual changes by experienced mappers.
Correct. Here’s the full workflow, omitting obviously necessary checks for sanity and correctness of edits:
You need to have the JOSM reverter plugin installed. Data -> Revert changeset then allows you to enter a changeset number - it then downloads all the objects and tries to revert the changes. It checks for conflicts (here it was about 500) which makes uploading the revert impossible without solving them manually.
You can just Edit -> Undo the revert which leaves you with all the objects touched in the changeset but in their current state.
Now you need to select the objects you want to edit. Here it is as simple as select all Ctrl + A, and in the list of tags right click on building=dam and select Search Key / Value. (You can also start from a single object selected or use the search function for more complex cases)
It also shows in the list of tags that for waterway there is now one object selected without that tag (1 unset) - this case should be checked manually. Open Edit -> Search and enter type:way and -waterway=dam and building=dam to find ways with the building but without the waterway tag. This one is a real building and should be retagged e.g. as building=industrial as mentioned above.
Edit the tags as needed and upload your changes.
Caveat in this case is that it also removes the tag in cases where the wrong tag has been added in the reverted changeset, had been removed and later added again. Depending on the use case this might not be acceptable, but here I think it is.
Luckily we don’t expose the method that downloads all changes of a changeset in Vespucci to users (yet) or else I would be pointing out that it is even simpler there :-).