Skip to content

hackergrrl/observe-export

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

observe-export

TODO: Put badges here.

Export observations and new OSM nodes from an osm-p2p-db used by field-data-collector

Table of Contents

Install

npm install observe-export

Usage

const osmdb = require('osm-p2p-mem')
const memdb = require('memdb')
const OBS = require('osm-p2p-observations')
const ObserveExport = require('../')

const osm = osmdb()
const obs = OBS({ db: memdb(), log: osm.log })

const observeExport = new ObserveExport(osm, obs)

const ids = ['12345', '54321']

observeExport.osmJson(ids, function (err, data) {
  // data is array of OSM objects for observations with `ids`
})

observeExport.osmJson(ids, {linkedNodes: true}, function (err, data) {
  // data is array of OSM objects for observations with `ids`
  // as well as any linked nodes in the p2p db.
})

API

Contribute

PRs accepted.

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT © Digital Democracy

About

Export observations from Observe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%