3 # -*- sh -*- vim: ft=sh sw=4 sts=4
5 if [ "$#" != 3 -a "$#" != 4 ]; then
6 echo "Usage: `basename $0` <LAT> <LON> <SCALE> [<IMAGE NAME>]" >&2
13 while [ "`expr $i \* 3000`" -lt "$3" -a $i -lt 64 ]; do
19 while [ -f "$HOME/.gpsdrive/top_file`printf %04d $file`.jpg" ]; do
20 file="`expr $file + 1`"
22 file=file"`printf %04d $file`"
24 wget -q "http://terraservice.net/GetImageArea.ashx?t=1&lat=$1&lon=$2&s=$j&w=1280&h=1024" -O /tmp/terraservice-$$.jpg || exit 1
26 mv /tmp/terraservice-$$.jpg "$HOME/.gpsdrive/top_${4:-$file}.jpg"
28 echo "top_${4:-$file}.jpg" $1 $2 `expr 180352 \* $i / 64` >> "$HOME/.gpsdrive/map_koord.txt"
29 #echo "top_${4:-$file}.jpg" $1 $2 `expr 181417 \* $i / 64` >> "$HOME/.gpsdrive/map_koord.txt"