Feature Request: geolocated distance (and/or gps coordinates of geolocated location)

Started by Marsu42, April 20, 2024, 05:28:36 AM

Previous topic - Next topic

Marsu42

I'm hoping you won't reget touching geolocation because it's another can of worms like video metatdata :-), but I'll risk it:

[...]

=> Could you implement a feature that adds the distance to wherever the geolocation is, and/or make the gps coordinates of the geolocated location available somehow?



Phil Harvey

I'm not sure I understand your lengthy description, but I think that ExifTool may already do what you want.  For example, the distance/direction from a GPS point to a known feature is given in the last 2 tags returned:

> exiftool -api geolocation="3.12345,-42.43536,New York City"
Geolocation City                : New York City
Geolocation Region              : New York
Geolocation Country Code        : US
Geolocation Country             : United States
Geolocation Time Zone           : America/New_York
Geolocation Feature Code        : PPL
Geolocation Population          : 8800000
Geolocation Position            : 40.7143, -74.0060
Geolocation Distance            : 5240.33 km
Geolocation Bearing             : 326

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

Marsu42

Quote from: Phil Harvey on April 20, 2024, 07:07:13 AMI'm not sure I understand your lengthy description, but I think that ExifTool may already do what you want.  For example, the distance/direction from a GPS point to a known feature is given in the last 2 tags returned:

I'm sorry for the length, I just wanted to legitimize my feature request.

Thanks for your command line that outputs the distance - I didn't see exiftool -api geolocation "-geolocation*" https://exiftool.org/geolocation.html ... will to to do better next time.

Phil Harvey

Great.  The Geolocation feature was indeed a lot of work, but rewarding because this is a fun feature that I will use myself.

- Phil

Edit: Also, browsing the documentation I don't think I have explained this feature very well.  I've got some more work to do there...

Edit2: I've added an example to demonstrate this feature on the Geolocation page.
...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

Version 12.84 will have a cool new ability that will allow you to find the nearest N features from a given GPS point (not just the closest).  For example, this command finds the nearest 4 features:

exiftool -a -api geolocation=49.48,6.37,num=4

I can imagine this feature being used in a GUI to present the user with a set of choices for the location name they prefer.

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

Marsu42

Quote from: Phil Harvey on April 21, 2024, 09:33:34 PMVersion 12.84 will have a cool new ability

Great, and it'is really appreciated.

It didn't take me too long to write a windows shell script that really enhances my Lightroom experience:

1. add the distance and the direction (like in N, NNW, NW, ...) to a City tag,
2. add a tag that contains the distance and direction to my home town from the shooting location.

This is only possible because of your work and the flexibility of exiftool,