Main Menu

Search GPS location

Started by Fulco, October 19, 2015, 06:16:45 PM

Previous topic - Next topic

Fulco

Is it possible to search for a specific GPS location?

I tried these commands, but without result:

exiftool -if 'abs($gpslatitude# - 48.8577471913) and abs($gpslongitude# - 2.2952922789)' -filename

exiftool -if '$gpslatitude =~ "48.8577471913"' -FileName


Thanks!
Fulco

Phil Harvey

Hi Fulco,

Quote from: Fulco on October 19, 2015, 06:16:45 PM
exiftool -if 'abs($gpslatitude# - 48.8577471913) and abs($gpslongitude# - 2.2952922789)' -filename

This tests to see if the position is exact (ie. the abs() returns zero), which is always problematic with floating point numbers.

Quoteexiftool -if '$gpslatitude =~ "48.8577471913"' -FileName

This syntax is wrong for a number of reasons.

I think you are perhaps looking for something more like this:

exiftool -if 'abs($gpslatitude# - 48.8577471913) < 1e-6 and abs($gpslongitude# - 2.2952922789) < 1e-6' -filename DIR

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

Fulco