Search/filter by GPS location

Started by mscalora, December 04, 2014, 08:16:27 AM

Previous topic - Next topic

mscalora

I am working on figuring out a way to search by proximity to a GPS location. I wanted to check to see if such a solution already exists before I spend too much time on it. I searched in these forums and with Google but didn't see anything that would work for me.

Is anyone aware of any search/filter by location tools?

My plan is to use exiftool to extract the data I need (in json) and write a script (with web UI) to search the exported data.

Thanks,
-Mike

Phil Harvey

Hi Steve,

You could do something like this:

exiftool if "abs($gpslatitude# - 45.2) < 1 and abs($gpslongitude# - 72.5) < 1" -directory -filename -T -r DIR

where DIR is the name of a directory containing the images, and 45.2 and 72.5 are the latitude/longitude of interest, and 1 is how close you want to be to this position.  The above quoting is for Windows.  On Mac/Linux use single q uotes instead.

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

mscalora

Thanks, that worked after I added a hyphen in front of the "if" like:

exiftool -if "abs($gpslatitude# - 45.2) < 1 and abs($gpslongitude# - 72.5) < 1" -directory -filename -T -r DIR

I'll see if it will perform well enough on my large collection of photos, if not I'll have to implement some caching/indexing mechanism.

-Mike