GithubHelp home page GithubHelp logo

osm-mend's Introduction

osm-mend

Build Status

Fix referential integrity issues with any OpenStreetMap data file based on the current state of data accessible via the OpenStreetMap API.

Why?

Extracts of data from OpenStreetMap may not ensure referential integrity. There are several reasons that this might be the case, and generally applications that depend on OpenStreetMap extracts are tolerant of these situations. This tool exists for scenarios where you need to be certain about the referential integrity of a data file.

How does it work?

The script relies heavily on the osmium CLI tool to find missing references and apply changesets to a data file in order to fix those missing references. The steps in process are as follows:

  • find missing references via osmium-tool check-refs
  • gather the XML of parent elements that have missing references via osmium-tool getid
  • look up the current state of missing references in the OpenStreetMap API
  • build an .osc.xml changeset to apply to the original file. This changeset:
    • creates any element that was missing in the data file but found in the API
    • modifies parent elements that reference an element that has been deleted or never existed (API returned 404 or 410).
  • applies the changeset to the original data file via osmium-tool apply-changes

How do I use it?

Install the tool, then use --help for more information.

$ npm install -g osm-mend
$ osm-mend --help
USAGE: osm-mend <input file> <output file>

  Note that both an input file and an output location are required.
  Existing files in the output location will be overwritten.

Please note that the script relies on pre-built osmium-tool binary that is not provided for Windows users.

osm-mend's People

Contributors

rclark avatar tmcw avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osm-mend's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.