Hi Gang:
Newbie here trying to find a solution to changing the GPS information from my drone (DMS) to UTM (Northings & Eastings). I have a Python script that I have written that creates a CSV file reporting the DMS values. I have run this CSV file through another program that converts these values into UTM coordinates. Now what I want to do is update the actual photograph's coordinates with my UTM coordinates - can I do this in batch (i.e., for a complete folder) with this tool? If this is possible, how would I do this? Is it possible through Python?
I have attached output from this tool and what I want it to go to for reference for the same photo.
Layne
reference.gif
Output.jpg
Hi Layne,
This ExifTool config file (https://raw.githubusercontent.com/exiftool/exiftool/refs/heads/master/config_files/gps2utm.config) allows you to convert GPS coordinates to UTM when reading from file.
...but where do you plan on storing them if you want to write them back to the file? EXIF doesn't support UTM coordinates. (MIE format does (https://exiftool.org/TagNames/MIE.html#UTM) :) but there's not much support for that.)
- Phil
Thank you for your reply. I did not know if I could simply over-write the data in the image. If I could add new data(i.e., new attributes) then maybe it would work.
At this point, at least now I know that EXIF V. 0230 doesn't support UTM coordinates. One option down - many more to go.
hey Phil:
With a change to my software, I now have output coordinates in the right format. I think I should now be able to update the Lat, Long and Elev attributes for each photo in my folder. I'd rather not do this one-by-one as often there are hundreds to thousands of photos per drone flight; thus, I'm thinking of doing this programmatically - likely with Python. Feeding into a python script the necessary variables by reading in a single row at a time is straight forward, but what would the ExifTool command be?
I don't know enough about what you want to do to be able to give you a command.
Generally, the commands to do similar things are:
1. Extract GPS from video to GPX file:
exiftool -p gpx.fmt -ee VIDEOFILE > out.gpx
2. Geotag photos based on extracted GPX:
exiftool -geotag out.gpx -ext jpg DIR
- Phil
hey Phil - sorry for being MIA for a while. Here is my problem and what I would like to do using your tool.
Drones report their elevations in WGS84 and my GIS software is having difficulties converting WGS84 elliptical elevations to something more useful in my GIS system.
Step 1 for me would be to create a csv file containing the relevant GPS exif information in it's default format (with as many decimal places as possible).
Step 2 for me would then be using another piece of software to convert the elevations into corrected elevations in a "corrected" csv file.
Step 3 for me would then be to overwrite the elevation exif information in a copy of the original photo from the corrected csv file. I think this is doable but would really appreciate your help in tweaking the command lines.
Layne
Use this command to output lat/lon/elevation:
If we're talking photos, then this is easy:
1. exiftool -csv -gpslatitude -gpslongitude -gpsaltitude -n DIR > out.csv
Then edit the altitude values of the CSV and write the new altitudes back to the files with:
2. exiftool -csv=out.csv -gpsaltitude DIR
- Phil
hey Phil:
Thanks SO much for this - it is greatly appreciated. Yes the main focus was for photos; however, now that you mention it, generating coordinates from a video might be handy as well - but you gave me those instructions previously.
Layne
hey Phil
I have adapted the commands that you gave to me, thanks again.
Command 1
exiftool -csv -gpslatitude -gpslongitude -gpsaltitude -relativealtitude -createdate -n C:\_LOCALdata\RPAS\Ben_Misner\GRL39668\Flights\DJI_202410111048_001_NorthSouthFence > C:\_LOCALdata\RPAS\Ben_Misner\GRL39668\Flights\DJI_202410111048_001_NorthSouthFence\Exif2CSV.csv
However; when I run Command 2, it fails saying there is no SourceFile in the imported CSV database.
exiftool -csv=C:\_LOCALdata\RPAS\Ben_Misner\GRL39668\Flights\DJI_202410111048_001_NorthSouthFence\GpsHOut.csv -gpsaltitude C:\_LOCALdata\RPAS\Ben_Misner\GRL39668\Flights\DJI_202410111048_001_NorthSouthFence
Any thoughts on what I did that is not working? I am wondering if the GpsHOut file needs to have the header \ column names and this is why it is not working?
Layne
Hi Layne,
Your file GpsHOut.csv is missing the column headings.
- Phil
hey Phil:
Yes it is - is that why the second command did not work?
Layne
From the docs on the
-csv option (https://exiftool.org/exiftool_pod.html#csv-CSVFILE) (emphasis mine)
QuoteWhen importing, the CSV file must be in exactly the same format as the exported file. The first row of the CSVFILE must be the ExifTool tag names (with optional group names) for each column of the file, and values must be separated by commas.
I'm not trying to be an ass, but how do you think exiftool is going to know what tags to fill in if the header is removed.
hey Phil:
Thank you again SO SO much for your help. Well it seems that my software does not actually use the exif info for GPS Altitude but rather the exif info called "Absolute Altitude". Is there somewhere that I can find out the difference between these two pieces of information?
Thank you StarGeek for your comments, they are appreciated.
Layne
Quote from: LayneSeely on June 11, 2025, 05:41:33 PMWell it seems that my software does not actually use the exif info for GPS Altitude but rather the exif info called "Absolute Altitude". Is there somewhere that I can find out the difference between these two pieces of information?
You might want to figure out what group the tag belongs to because
AbsoluteAltitiude isn't an EXIF tag. Use the command in FAQ #3 (https://exiftool.org/faq.html#Q3) to list the groups as well as duplicate tags.
Odds are it is the
XMP-drone-dji:AbsoluteAltitude, though there are a couple other
AbsoluteAltitude tags, but I don't think they would apply here.
As for the exact meaning, AFAIK, DJI hasn't released any documentation on it. You can search these forums to see if it has popped up before. Or search elsewhere on the web for a more DJI specific source of information.
hey StarGeek:
You are correct. See attached file.
AbsoluteAltitude.jpg
I will reach out to DJI and see if I can get any further info from their support folks and get back with any information that they provide.
Layne
hello StarGeek:
I have a new question but it is related to this string. When I use ExifTools to read the metadata on one of my original drone image, it lists the "Absolute Altitude" in this format: "+934.476" yet after I have attempted to update it after doing my conversion, I do not have the "+" in front of my value of 953.797. I presume that I should also be updating a reference somewhere but I am unsure of which one. Unfortunately, my images are too large to send to you. I can send them via other channels but I would need an email address to respond to.
This is what I got back from ESRI regarding why they use "AbsoluteAltitude" in Drone2Map:
During the development of D2M 1.0, when we used Pix4D, they recommended we use AbsoluteAltitude because DJI firmware was not reliable for GPSAltitude.
For DJI Drones we use AbsoluteAltitude from the XMP metadata. For non DJI drones we use GPSAltitude from the exif metadata.
What we have found with our testing of DJI M3E (and other DJI drones) is that AbsoluteAltitude and GPSAltitude are always the same. I would recommend the user check the firmware on the drone since they are seeing these two values differ.
Layne
This value is stored as a string, so if you want to read back with a leading "+" you have to add it when writing:
% exiftool a.jpg -xmp-drone-dji:absolutealtitude=+934.476
1 image files updated
% exiftool a.jpg -xmp-drone-dji:absolutealtitude
Absolute Altitude : +934.476
- Phil