Multiple image GPS location - inconsistent format results

Started by hash, February 10, 2019, 05:46:04 AM

Previous topic - Next topic

hash

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

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 philharvey66 at gmail.com

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

Phil Harvey

I got the samples.  This is the problem:

> 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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

hash

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

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

#6
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.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).