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 osm.org/changeset/62632427. And this is the changeset that got reverted osm.org/changeset/62629726.