⚠️ This repo is archived because it is no longer used and no stacks are running.
Previously used only in transferred and discontinued mapbox/osmcha project.
Shutdown ticket in Jira for reference.
Compare functions are small atomic functions that are designed to identify what changed during a feature edit on OpenStreetMap. Compare functions can be broadly split up into two categories:
Compare functions take as inputs the following:
oldVersion
- GeoJSON of the feature's old versionnewVersion
- GeoJSON of the feature's new versionCompare functions output the following:
result
- Object containing key value pairs representing findings of the compare function or an empty object.# Format of compare function result where value can be primary data types or objects
{
'result:comparator_name': value,
'message': Any custom message which corresponds to the catch
}
# Format of compare function if no result, (default)
false
# Install osm-compare from the Mapbox namespace.
npm install @mapbox/osm-compare
npm version [major|minor|patch]
.git push --tags
npm publish