Last active
August 1, 2021 08:52
-
-
Save tyjak/46f34adbcf7f969d2c4b60daae644b60 to your computer and use it in GitHub Desktop.
openstreet map route cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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