Bulk editing GPS altitude

Started by Richi, March 19, 2024, 02:35:18 AM

Previous topic - Next topic

Richi

Hi,

I am attempting to extract GPS coordinates and altitudes from a batch of images, running them through an ellipsoidal to orthographic height converter, then changing out the altitude values for each image but retaining all other metadata fields.

So far I have been able to extract a csv of the fields I need using:

exiftool -filename -gpslatitude -gpslongitude -gpsaltitude -csv -T -r -n c:\Users\Name > output.csv

I have modified the altitude fields but am struggling to find a way to now use the csv to edit the GPSaltitude field in the original images.

Any suggestions would be much appreciated, thanks.

Phil Harvey

If you have a CVS file with just SourceFile and GPSAltitude columns, then you can use this command to write the GPSAltitude to all files:

exiftool -csv=CSVFILENAME.csv DIR

But you should also be setting GPSAltitudeRef (presumably to "Above Sea Level").

- 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

Quote from: Phil Harvey on March 19, 2024, 08:35:37 AMBut you should also be setting GPSAltitudeRef (presumably to "Above Sea Level").

This would also apply to GPSLatitude/GPSLongitude if you edit them, as the reference direction (N/S/E/W) are held in the separate GPSLatitudeRef/GPSLongitudeRef tags.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).