Skip to content

Instantly share code, notes, and snippets.

@colindean
Last active September 6, 2017 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colindean/72b8143b2d2caaacc0ba2786f1a9b948 to your computer and use it in GitHub Desktop.
Save colindean/72b8143b2d2caaacc0ba2786f1a9b948 to your computer and use it in GitHub Desktop.
http://www.pittmesh.net/node-data/nodes.json converted to GeoJSON format
#!/usr/bin/env bash
# nodes.json has JSONP crap on it so you have to remove
# the first and last line of the file before parsing it as JSON.
curl http://www.pittmesh.net/node-data/nodes.json | tail -n +2 | sed '$d' | jq -s '.[] | { type: "FeatureCollection", features: [ .[] | {type: "Feature", id: .name, properties: { address, hood, status, device_count }, geometry: { type: "Point", coordinates: [ .lon, .lat] } } ] }'
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment