Skip to content

Instantly share code, notes, and snippets.

@zhm
Created October 5, 2012 15:02
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 zhm/3840334 to your computer and use it in GitHub Desktop.
Save zhm/3840334 to your computer and use it in GitHub Desktop.
Make a quick CSV from any tag/value in OSM
TAG="amenity" && VALUE="baby_hatch" && curl -s "http://overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%3B%28node%5B${TAG}%3D%27${VALUE}%27%5D%3B%29%3Bout%3B" | grep -E "lat|lon" | sed 's/"//g' | sed -E 's/lat: (.+),/\1|/' | sed 's/lon: //' | sed 's/ //' | xargs | tr ',' '\n' | tr '|' ',' | sed 's/ //g' | grep -Ev '^$'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment