From: martin-s Date: Mon, 31 Mar 2008 15:02:57 +0000 (+0000) Subject: Add:Core:Added rudimentary support for geotagging X-Git-Tag: navit-0.5.0.5194svn~4183 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3e2b21df3b2ac78d4f708be5b5ab13def6948c0;p=profile%2Fivi%2Fnavit.git Add:Core:Added rudimentary support for geotagging git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@969 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/src/script/geotag b/navit/src/script/geotag new file mode 100755 index 0000000..e025cbc --- /dev/null +++ b/navit/src/script/geotag @@ -0,0 +1,36 @@ +#! /bin/sh +#TZ=UTC+00:00:00 +TZ=UTC+00:59:57 +export TZ +order=${5%%,*} +case $order in +10|11) + size=1000 + ;; +12|13) + size=4000 + ;; +14|15) + size=16000 + ;; +16|17|18|19) + size=64000 + ;; +*) + exit +esac +ls -l --full-time images/*.jpg | sed -e 's/^\([^ ]* \)\{5\}//' -e 's/20\([0-9]*\)-\([0-9]*\)-\([0-9]*\) \([0-9]*\):\([0-9]*\):\([0-9]*\)\.[0-9]* [^ ]*/\\$GPRMC,\4\5\6\\.000,\\([^,]*,\\)\\{7\\}\3\2\1,\\([^,]*,\\)\\{2\\}[^,]*\\*..$/' | tail +2 | +while read -r sentence image +do + if [ ! -f $image.$size ] + then + djpeg -scale 1/8 $image | pamscale -pixels $size | cjpeg >$image.$size + + fi + if [ ! -f $image.txt ] + then + grep -e "$sentence" tracks/* | sed -e 's/^\([^,]*,\)\{3\}\(\([^,]*,\)\{4\}\).*/\2/' -e 's/,/ /g' > $image.txt + [ -s $image.txt ] || echo "$sentence not found" >&2 + fi + sed "s&\$&type=poi_image label=$image.$size&" <$image.txt +done