Main Menu

Question to geolocation

Started by herb, November 15, 2024, 05:47:08 AM

Previous topic - Next topic

herb

Hello Frank

writing geolocation data I have seen that ExifToolGUI writes
- xmp-iptcExt:Location Shown
- Exif: GPSLatitude[Ref] and GPSLongitude[Ref] and
- some xmp-Photoshop tags

Very good!
But why does it write GPSLatitude/Longitude[Ref] and not GPSDestLatitude/GPSDestLongitude[Ref]?

MWG 2.0 states that GPSLatitude should contain the GPS data written e.g. by the camera and GPSDestLatitude should contain data of "subject location".
Please see also GPS-tags page of Exiftool.

Best regards
herb

FrankB

#1
Hello Herb,

First of all, thank you for this feedback. I would like GUI to be as good as possible and conforming to standards. This helps.

Quote from: herb on November 15, 2024, 05:47:08 AMHello Frank
But why does it write GPSLatitude/Longitude[Ref] and not GPSDestLatitude/GPSDestLongitude[Ref]?

I'm not always able to answer the 'why'. A lot of GUI is heritage from Bogdan.

I'm open to suggestions for improvements though. But I would like to know what specific function you are referring to.

You can use the 'Geotag files' button on the OSM map. That writes only: GPSLatitude/Longitude[Ref]
You can use the 'Export/Import, Import GPS data from, XMP files' That also writes only: GPSLatitude/Longitude[Ref]
You can use the 'Export/Import, Import GPS data from, Log files' That uses exiftools -GeoTag function.

And of course you can use ExifTool Direct, or the Workspace, but that's obvious

Frank

EDIT: There is also 'Modify, Update City, Province, Country from GPS Coordinates' But that does not update Latitude,Longitude, it only reads them.

Phil Harvey

#2
Hi Herb,

I think ExifTool is doing it the way most people would prefer.  However, you may write the geolocation information to any tag you want by using the API Geolocation option and copying the geolocation tags wherever you want.  You will need to use an advanced formatting expression to split GeolocationPosition into GPSDestLatitude and GPSDestLongitude.

- Phil

Edit: Here is an arg file to do the necessary gymnastics to copy the GeolocationPosition into the GPSDest tags:

-gpsdestlatitude<${geolocationposition;s/,.*//}
-gpsdestlatituderef<${geolocationposition;s/,.*//;$_=/-/ ? 'S' : 'N'}
-gpsdestlongitude*<${geolocationposition;s/.*, //}
-gpsdestlongituderef<${geolocationposition;s/.*, //;$_=/-/ ? 'W' : 'E'}

So the command would be something like this (assuming the above argfile is named "gpsdest.args"):

exiftool -@ gpsdest.args -api geolocation=Paris,France FILE
...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 ($).

herb

Hello Phil, hello Frank,

thanks for your comments and also the code-snippets.

QuoteI think ExifTool is doing it the way most people would prefer.
Yes I understand and fully agree.

Best regards
herb