Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Latest commit

 

History

History
59 lines (38 loc) · 2.06 KB

README.md

File metadata and controls

59 lines (38 loc) · 2.06 KB

⚠️ 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.


osm-compare

Travis CI

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:

  1. Property (tags) checking compare function
  2. Geometry checking compare functions

Compare functions take as inputs the following:

  1. oldVersion - GeoJSON of the feature's old version
  2. newVersion - GeoJSON of the feature's new version

Compare functions output the following:

  1. 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

# Install osm-compare from the Mapbox namespace.
npm install @mapbox/osm-compare

Docs

How do I build an npm package?