Menu

#17 reading gps-info from exif can't cope with deg:min:sec

open
Termite
None
5
2007-07-17
2007-07-17
konus77
No

Hello,
after writing gps-Info to images with GPicSync (http://code.google.com/p/gpicsync/), the coordinates are not recognised properly in Gallery. I get the (german) error:
"GPS-Koordinaten wurden erkannt, hatten aber scheinbar ein ungültiges Format. Benutzung auf eigene Gefahr oder Korrektur nötig."
(try to translate: Koordinates found, but wrong format...)

The attached sample image is located at
N48.135067 E11.575857

I belive that in the image the format is written in Exif as
N 48° 8min 6,24s
E 11° 34min 33,09s

but in Gallery it will be recognised as 6.3878666666667,33.654922222222

Is there a possibillity to change the behavior of modules:map ? Or is my image not geocoded correctly? Any hint is strongly appreciated!

greetings Konus77

Discussion

  • konus77

    konus77 - 2007-07-17

    Image Sample with GPS Info in EXIF

     
  • Termite

    Termite - 2007-07-17
    • assigned_to: nobody --> termitenshort
     
  • Termite

    Termite - 2007-07-17

    Logged In: YES
    user_id=1373545
    Originator: NO

    I will take a look at this tomorrow night (07/18/07) and let you know.

    Thanks !

     
  • Nobody/Anonymous

    Logged In: NO

    I have fixed this problem by modifying the modules/exif/lib/exifer/makers/gps.inc file.
    I don't know where the problem is from (I use Nikon camera and insert GPS exif data with Digikam) but I had to modify the GPS data reading algorithm bypassing GPSRational function like that:

    modules/exif/lib/exifer/makers/gps.inc after line 111

    if($tag=="0002" || $tag=="0004") { //Latitude
    $hour = GPSRational(substr($data,0,16),$intel);
    $minutes = GPSRational(substr($data,16,16),$intel);
    $seconds = GPSRational(substr($data,32,16),$intel);
    [...]

    by :

    if($tag=="0002" || $tag=="0004") { //Latitude
    $hour = hexdec(substr($data,40,8));
    $minutes = hexdec(substr($data,24,8))/((float)hexdec(substr($data,16,8)));
    $seconds = 0;

    I tested with your picture: it works for me

     

Log in to post a comment.