Compare a features new and old versions in GeoJSON


30379.4.15 months ago5 years agoMinified + gzip package size for @mapbox/osm-compare in KB



Travis CI

Compare functions are small atomic functions that are designed 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)


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


How do I build an npm package?

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.