Skip to content

Generate a diff of OSM documents in two osm-p2p-db instances.

Notifications You must be signed in to change notification settings

hackergrrl/osm-p2p-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

osm-p2p-diff

Generate a diff of OSM documents in two osm-p2p-db instances.

Writes, to standard out, all of the OSM documents that appear in the second DB that don't appear in the first, as newline-delimited JSON.

Can be used in conjunction with osm-p2p-append to merge two osm-p2p-db databases together.

CLI

  USAGE: osm-p2p-diff <LEVELDB-DIR> <LEVELDB-DIR>

Point this at two hyperlog leveldb directories. If you're working with an osm-p2p-db, this will be osm-dir/log.

To perform a merge between two osm-p2p-dbs, combine with osm-p2p-diff:

$ osm-p2p-diff osm1/log osm2/log > diff
$ osm-p2p-append osm1 < diff

API

var diff = require('osm-p2p-diff')

var readable = diff(log1, log2)

Accepts two hyperlog instances of two osm-p2p-dbs. Returns a Readable stream of newline-delimited JSON containing the documents that are in log2 but not log1.

Install

With npm installed, run

$ npm install -g osm-p2p-diff

See Also

License

ISC

About

Generate a diff of OSM documents in two osm-p2p-db instances.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published