Added scripts to grab EXIF GPS data and create WPT GPX

This commit is contained in:
Brandon Rozek 2022-06-16 20:45:20 -04:00
parent 220f2b7571
commit 980ac04f51
3 changed files with 97 additions and 0 deletions

24
getWPT.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
set -o errexit
set -o nounset
set -o pipefail
show_usage() {
echo "Usage: getWPT.sh [imagefile] [?name]"
exit 1
}
# Check argument count
if [ "$#" -ne 1 ]; then
show_usage
fi
getLLA="$(dirname $0)/getLLA.sh"
LLA=$("$getLLA" "$1")
IMAGE_NAME=$(basename "$1")
NAME_ARG=${2-""}
NAME=$([ "$NAME_ARG" != "" ] && echo "$NAME_ARG" || echo "$IMAGE_NAME")
echo -e "$LLA\n$NAME" | xargs $(dirname $0)/LLA2WPT.sh