Skip to content

Instantly share code, notes, and snippets.

@missinglink
Last active August 29, 2015 14:06
Show Gist options
  • Save missinglink/bdc02598b4a60f50aae0 to your computer and use it in GitHub Desktop.
Save missinglink/bdc02598b4a60f50aae0 to your computer and use it in GitHub Desktop.
stream the latest 26GB openstreetmap .pbf planet dump to a terminal near you; a bash one-liner courtesy of mapzen
#!/bin/bash
npm install openstreetmap-stream; curl -s http://planet.osm.org/pbf/planet-latest.osm.pbf | node -e "var osm = require('openstreetmap-stream'); process.stdin.pipe(osm.parser()).pipe(osm.stringify).pipe(process.stdout);";
@missinglink
Copy link
Author

I've written up some docs: https://github.com/geopipes/openstreetmap-stream which show a few ways you can integrate this in to a node app; or you can just use unix pipes to send it onward to your language of choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment