[Digikam-devel] [Bug 133359] WISH: Google maps support to show satellite images of the photos

Antonio E. aironmail at gmail.com
Sat Sep 16 13:15:28 BST 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=133359         




------- Additional Comments From aironmail gmail com  2006-09-16 14:15 -------
You gave me the hint to fix it.

I found that (for a reason that I don't understand) $1*-1.0 returns an integer instead of a float.

I have done a workaround that works perfectly. Instead of multiply by -1.0 just replace the '-' char with nothing if it has a negative value.

So, the lines:
lat=$(echo "$1" | awk '{if ($1 < 0) print $1*-1; else print $1}') #
lon=$(echo "$2" | awk '{if ($1 < 0) print $1*-1; else print $1}') #

are replaced with:
lat=$(echo "$1" | awk '{val = $1; if ($1 < 0) sub(/-/, "", val); print val}')
lon=$(echo "$2" | awk '{val = $1; if ($1 < 0) sub(/-/, "", val); print val}')

After doing it the coordinates are well taken for me.

exiftool-gps-wrapper 36.527924 -6.315497 100_3445.JPG
100_3445.JPG
36.527924, N, 6.315497, W, 100_3445.JPG, , 100_3445.JPG
    1 image files updated
GPS Version ID                  : 2.2.0.0
GPS Latitude Ref                : North
GPS Latitude                    : 36 deg 31' 40.53"
GPS Longitude Ref               : West
GPS Longitude                   : 6 deg 18' 55.79"
GPS Altitude                    : 0 metres
GPS Map Datum                   : WGS-84

And now the maps have an acceptable accuracy.



More information about the Digikam-devel mailing list