Skip to content

Instantly share code, notes, and snippets.

@tyjak
Last active August 1, 2021 08:52
Show Gist options
  • Save tyjak/46f34adbcf7f969d2c4b60daae644b60 to your computer and use it in GitHub Desktop.
Save tyjak/46f34adbcf7f969d2c4b60daae644b60 to your computer and use it in GitHub Desktop.
openstreet map route cli
#!/bin/sh
# Simple route request with openstreetmap
# depend on vimb, curl and jq
# GistID: 46f34adbcf7f969d2c4b60daae644b60
vimb https://www.openstreetmap.org/directions\?engine\=fossgis_osrm_car\&route\=$(curl https://nominatim.openstreetmap.org/search\?q\=$1\&format\=json | jq -r '.[0].lat + "%2C" + .[0].lon')%3B$( curl https://nominatim.openstreetmap.org/search\?q\=$2\&format\=json | jq -r '.[0].lat + "%2C" + .[0].lon' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment