Skip to content

Instantly share code, notes, and snippets.

@pkqk
Last active September 15, 2015 14:27
Show Gist options
  • Save pkqk/807737ad0c6af4586382 to your computer and use it in GitHub Desktop.
Save pkqk/807737ad0c6af4586382 to your computer and use it in GitHub Desktop.
turn content api results into geojson
curl "http://contentapi.theodi.org/with_tag.json?type=node" |
jq '{
type: "FeatureCollection",
features: [
.results[] | {
type: "Feature",
geometry: {type: "Point", coordinates: [.details.location[1], .details.location[0]]},
properties: {name: .title}
}
]
}'
Display the source blob
Display the rendered blob
Raw
Loading
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