Author Topic: longitude/latitude are swapped when geotagging with certain KML files  (Read 3113 times)

lpm

  • Newbie
  • *
  • Posts: 2
This is a head scratcher...
OS - Windows XP 32-bit SP3
exiftool - 8.05 and 8.20
exact command: exiftool -geotag test.kml test.jpg

After geotagging, the output of 'exiftool test.jpg' shows Latitude and Longitude reversed, the geo tag is erroneous.
GPS Latitude                    : 122 deg 41' 26.26" S
GPS Longitude                   : 45 deg 30' 29.90" E
GPS Position                    : 122 deg 41' 26.26" S, 45 deg 30' 29.90" E

If I use the GPX format instead, the problem does not happen. I initiatlly assumed I had a corrupted KML file, but I can't see what's wrong with it, it looks fine visually and opens OK in Google Earth.


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16658
    • ExifTool Home Page
Wow, you're quite right.  Thanks for the report.

I just checked the KML specification and the order of the coordinates is long then lat, but exiftool was reading them the other way around.  Ooops!

This will be fixed in exiftool 8.21.

- Phil
 
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

lpm

  • Newbie
  • *
  • Posts: 2
Phil,

Thank you very much for the quick reply - ping me if you need to use me for testing. exiftool rocks.

Laurent

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16658
    • ExifTool Home Page
Hi Laurent,

Thanks for the offer.  I think I have all that I need with the samples you sent.  I had to guess at your timezone though, either UTC-07 or UTC-08 I assume.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).