Isso resultará em uma versão mais curta:
exiftool -coordFormat '%.4f' '-filename<${gpslatitude;} ${gpslongitude} ${datetimeoriginal}_$filename' -d "%Y-%m-%d_%H.%M.%S%%-c.%%e" *.JPG
Mas ainda adiciona o ponto de bússola N, E, S ou W
Se você deseja adicionar a cidade, isso pode ser adicionado com um loop, usando a API nominatim :
#!/bin/bash
#exiftool '-filename<${datetimeoriginal}_$filename' -d "%Y-%m-%d_%H.%M.%S%%-c.%%e" *.JPG
for f in *.JPG; do
echo "$f"
LAT="$(exiftool -coordFormat '%.4f' "$f"|egrep 'Latitude\s+:'|cut -d\ -f 23)"
if [ "$LAT" == "" ]; then
echo 'no geo coordinates';
else
LON="$(exiftool -coordFormat '%.4f' "$f"|egrep 'Longitude\s+:'|cut -d\ -f 22)"
URL='http://nominatim.openstreetmap.org/reverse?format=xml&lat='$LAT'&lon='$LON'&zoom=18&addressdetails=1'
RES="$(curl -s "$URL"|egrep "<(city|village|town|ruins|state_district|country)")"
LOC="$(echo "$RES"|grep '<city>'|sed 's/^.*<city>//g'|sed 's/<\/city>.*$//g')"
if [ "$LOC" == "" ]; then
LOC="$(echo "$RES"|grep '<city_district>'|sed 's/^.*<city_district>//g'|sed 's/<\/city_district>.*$//g')"
fi
if [ "$LOC" == "" ]; then
LOC="$(echo "$RES"|grep '<village>'|sed 's/^.*<village>//g'|sed 's/<\/village>.*$//g')"
fi
if [ "$LOC" == "" ]; then
LOC="$(echo "$RES"|grep '<town>'|sed 's/^.*<town>//g'|sed 's/<\/town>.*$//g')"
fi
if [ "$LOC" == "" ]; then
LOC="$(echo "$RES"|grep '<ruins>'|sed 's/^.*<ruins>//g'|sed 's/<\/ruins>.*$//g')"
fi
if [ "$LOC" == "" ]; then
LOC="$(echo "$RES"|grep '<state_district>'|sed 's/^.*<state_district>//g'|sed 's/<\/state_district>.*$//g')"
fi
if [ "$LOC" == "" ]; then
LOC="$(echo "$RES"|grep '<country>'|sed 's/^.*<country>//g'|sed 's/<\/country>.*$//g')"
fi
if [ "$LOC" == "" ]; then
echo "no city found at $URL";
else
BASE="${f%.*}"
mv -v "$f" "$BASE-$LOC.JPG"
fi
fi
done
Quando você terminar, poderá contar suas imagens por local com
ls -1|cut -d- -f 4|sort|uniq -c|sort -n