Author Topic: Multiple image GPS location - inconsistent format results  (Read 164 times)

hash

  • Newbie
  • *
  • Posts: 2
Multiple image GPS location - inconsistent format results
« on: February 10, 2019, 05:46:04 AM »
Hi.
I'm trying to extract GPS location from multiple images to one file using :
exiftool -filename -gpslatitude -gpslongitude -gpsaltitude -T E:\Foto > out.txt

The results are:
100_0001_0001.JPG   47.62936104   26 deg 12' 45.86" E   554 m Above Sea Level
100_0001_0002.JPG   47.62928575   26 deg 12' 45.32" E   553.9 m Above Sea Level
100_0001_0003.JPG   47 deg 37' 45.06" N   26 deg 12' 44.55" E   553.8 m Above Sea Level
100_0001_0004.JPG   47 deg 37' 44.68" N   26 deg 12' 43.79" E   553.8 m Above Sea Level
...

As you can see there are DD and DMS formats.

The -n parameter returns:
100_0001_0001.JPG   47.6293610277778   26.2127385833333   554.047
100_0001_0002.JPG   47.62928575   26.2125889444444   553.996
100_0001_0003.JPG   47.6291825   26.2123756666667   553.892
100_0001_0004.JPG   47.6290790277778   26.2121646666667   553.897
...

Is there a way to get DMS format for all ?

Thanks.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: Multiple image GPS location - inconsistent format results
« Reply #1 on: February 10, 2019, 09:00:58 AM »
That is odd.  There must be something funny with this file.  Can you send me the first file so I can take a look?  My email is phil at owl.phy.queensu.ca

- 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 ($).

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: Multiple image GPS location - inconsistent format results
« Reply #2 on: February 10, 2019, 11:16:53 AM »
I got the samples.  This is the problem:

Code: [Select]
> exiftool ~/Desktop/100_0001_000* -gps'*' -G1 -a
======== /Users/phil/Desktop/100_0001_0003.JPG
[GPS]           GPS Version ID                  : 2.3.0.0
[GPS]           GPS Latitude Ref                : North
[GPS]           GPS Latitude                    : 47 deg 37' 45.06"
[GPS]           GPS Longitude Ref               : East
[GPS]           GPS Longitude                   : 26 deg 12' 44.55"
[GPS]           GPS Altitude Ref                : Above Sea Level
[GPS]           GPS Altitude                    : 553.892 m
[XMP-drone-dji] Gps Latitude                    : 47.62918251
[XMP-drone-dji] Gps Longtitude                  : 26.21237569
[Composite]     GPS Altitude                    : 553.8 m Above Sea Level
[Composite]     GPS Latitude                    : 47 deg 37' 45.06" N
[Composite]     GPS Longitude                   : 26 deg 12' 44.55" E
[Composite]     GPS Position                    : 47 deg 37' 45.06" N, 26 deg 12' 44.55" E
======== /Users/phil/Desktop/100_0001_0004.JPG
[GPS]           GPS Version ID                  : 2.3.0.0
[GPS]           GPS Latitude Ref                : North
[GPS]           GPS Latitude                    : 47 deg 37' 44.68"
[GPS]           GPS Longitude Ref               : East
[GPS]           GPS Longitude                   : 26 deg 12' 43.79"
[GPS]           GPS Altitude Ref                : Above Sea Level
[GPS]           GPS Altitude                    : 553.897 m
[XMP-drone-dji] Gps Latitude                    : 47.62907906
[XMP-drone-dji] Gps Longtitude                  : 26.21216467
[Composite]     GPS Altitude                    : 553.8 m Above Sea Level
[Composite]     GPS Latitude                    : 47 deg 37' 44.68" N
[Composite]     GPS Longitude                   : 26 deg 12' 43.79" E
[Composite]     GPS Position                    : 47 deg 37' 44.68" N, 26 deg 12' 43.79" E
    2 image files read

There are DJI-specific XMP coordinates that are not (yet) converted by ExifTool.  I don't understand why the XMP-drone-dji version would be extracted for latitude but not longitude, but if you specify Composite:GPSLatitude/Longitude then you should get the properly converted versions.

And I'll add support for converting the DJI XMP tags in the next release.

- 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 ($).

hash

  • Newbie
  • *
  • Posts: 2
Re: Multiple image GPS location - inconsistent format results
« Reply #3 on: February 10, 2019, 02:13:08 PM »
Thanks a lot for your answers.
After some digging I found that DD values, with 8 digits, in xmp, are on mm (millimetre) range accuracy while DMS values are m (meter) range accuracy.
I think DJI stores RTK values on xmp and internal GPS on exif ... just guessing.
Thanks again !

I attached a link just for reference ...
https://gisjames.wordpress.com/2016/04/27/deciding-how-many-decimal-places-to-include-when-reporting-latitude-and-longitude/

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: Multiple image GPS location - inconsistent format results
« Reply #4 on: February 11, 2019, 06:41:55 AM »
I figured out why the difference between latitude and longitude.  It is due to a mis-spelling by DJI: "Longtitude" should be "Longitude" (note the extra "t").  Not quite sure how to handle this in ExifTool, since presumably they will discover their spelling mistake at some point and fix it.

- 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 ($).

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2372
Re: Multiple image GPS location - inconsistent format results
« Reply #5 on: February 11, 2019, 12:10:07 PM »
Phil, was the file one that had been edited by exiftool or did it appear to be original?  I'm wondering if the makeshift DJI config file worked up earlier might have some errors in it.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: Multiple image GPS location - inconsistent format results
« Reply #6 on: February 11, 2019, 02:33:50 PM »
Good point.  I don't think ExifTool wrote this XMP, but it would be good to confirm that it was written by a DJI drone or software.

- Phil

Edit:  I think this is the thread that StarGeek is referring to.  And this one.
« Last Edit: February 11, 2019, 02:50:15 PM by Phil Harvey »
...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 ($).