Skip to content

Instantly share code, notes, and snippets.

@frafra
Last active July 11, 2018 20:24
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 frafra/6a29819b125c562118765adbe01aa37f to your computer and use it in GitHub Desktop.
Save frafra/6a29819b125c562118765adbe01aa37f to your computer and use it in GitHub Desktop.
su.openstreetmap.it / onosm.org recipes

su.openstreetmap.it / onosm.org recipes

These recipes are for su.openstreetmap.it, but they can be used for onosm.org (replace the URL where necessary).

Note: jq can be required by some recipes.

Get the first 100 unresolved notes (geojson)

curl 'https://api.openstreetmap.org/api/0.6/notes/search.json?q=su.openstreetmap.it&limit=100&closed=0' -o notes.geojson

Then import the geojson file into JOSM using the GeoJSON plugin.

Get the first 100 unresolved notes (links)

curl 'https://api.openstreetmap.org/api/0.6/notes/search.json?q=su.openstreetmap.it&limit=100&closed=0' |
    jq -r '.features[].properties.id | "https://www.openstreetmap.org/note/"+@text'

Get a random unresolved note and open it with your browser

xdg-open $(curl 'https://api.openstreetmap.org/api/0.6/notes/search.json?q=su.openstreetmap.it&limit=100&closed=0' |
    jq -r '.features[].properties.id | "https://www.openstreetmap.org/note/"+@text' |
    sort -R | head -n1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment