ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: lpm on May 31, 2010, 11:34:48 PM

Title: longitude/latitude are swapped when geotagging with certain KML files
Post by: lpm on May 31, 2010, 11:34:48 PM
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.

Title: Re: longitude/latitude are swapped when geotagging with certain KML files
Post by: Phil Harvey on June 01, 2010, 07:23:54 AM
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
Title: Re: longitude/latitude are swapped when geotagging with certain KML files
Post by: lpm on June 01, 2010, 09:38:09 AM
Phil,

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

Laurent
Title: Re: longitude/latitude are swapped when geotagging with certain KML files
Post by: Phil Harvey on June 01, 2010, 12:57:47 PM
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