OpenStreetMap

Finding reverted changesets on OSM

Posted by manoharuss on 18 September 2018 in English.

Defining reversion

Through a healthy community and map-gardening many of the critical issues get noticed and acted upon immediately. A revert is absolute and removes changes indefinitely from the map. Repairs are more manual, often done with a mix of reversion and manual fixes, which are harder to track. osm-revert-changesets npm module is aimed at tracking absolute reverts and works well at 1:1 (changeset to changeset) reverts.

Reversion rules used

Currently, the module uses a starting set of 2 rules to identify reverted changesets.

  • Deletions of created features
    • If a feature gets deleted at 2nd version. The edit that created the feature at 1st version is reverted.
  • Feature state is reset
    • If Nth version of a feature is reset to N-2th version of a feature, then modifications that were done at N-1th, were reverted.

Usage

npm install osm-revert-changesets

const revertChangesets = require('osm-revert-changesets'); revertChangesets('62632427').then((list) => console.log(list));

Log [ '62629726' ]

This is the input used - DWG repair changeset https://www.openstreetmap.org/changeset/62632427. And this is the changeset that got reverted https://www.openstreetmap.org/changeset/62629726.

Use cases

  • Reverted could be a flag for changesets in OSMCHA. Reverted changesets could be marked as bad automatically and they don’t have to be reviewed again saving review time. I ticketed this feature request in OSMCHA at https://github.com/willemarcel/osmcha-django/issues/160

  • For large reverts conducted by DWG, this module could be used to return a list of reverted changesets to understand extent of damage, accounts involved and map area affected.

  • When changesets get reverted, the edits are removed from the map indefinitely. This module could be used to track amount of reversion on OSM.

Known issues

  • This module uses and depends on augmented changesets generated from osm-compare project used in OSMCHA. Example changeset: https://s3.amazonaws.com/mapbox/osm-adiff-compare/production/56917896.json
    • If a changeset is not available in this bucket, the npm module throws failed to fetch errors
  • Module fails for reversion of changesets that have modified a feature more than once. Example is https://www.openstreetmap.org/way/622327697/history. This feature is created at V1, modified at V2, and then deleted at V3.

I would like community help in improving the reversion rules and to expand success rate of this module. Shifting to public API with longer historical data for getting feature history would improve reliability. If you have feedback and ideas for improvement, please file issues over at https://github.com/manoharuss/osm-revert-changesets/issues/.

Discussion

Comment from R0bst3r on 19 September 2018 at 07:09

Good approach for a new filter. I like it and I see useful benefits for OSMCha.

Log in to leave a comment