OSM Planet Stream creates a readable stream
that combines the metadata from planet.osm.org with the Augmented Diff API.
Planet stream uses redis as a backing cache to merge the data from OSM and Overpass. To run standalone, you can either use your own redis server or use the provided Dockerfile.
After cloning the repository:
docker-compose run -d app
TO output data that contains hashtags in the comment
field
docker-compose run -d app bin/planet-stream.js --hashtags
STDOUT/STDERR will be available using docker logs -f [container_name]
-
Start a redis server (for now works only with redis default port)
-
Install
npm install -g planet-stream
- Start
planet-stream [-v] [--hashtags]
Options:
- -v : verbose logging (for debugging)
- --hashtags : only output changesets that contain a 'hashtag' in the comment
You can include Planet Stream as a library in your own code. npm install planet-stream
var planet = require('planet-stream')({
'port': 6379,
'host': '127.0.0.1'
});
planet.onValue(function (data) {
console.log(data);
})
Included in the repo is a simulator for generating test data that has the same schema as planet-stream
(useful for debugging downstream apps without waiting for OSM)
bin/ops-simulator.js