Reverse Geocoding (feature request)

Started by Happy Hobo, September 15, 2021, 07:40:52 PM

Previous topic - Next topic

Happy Hobo

It would be convenient if exiftool could access a geocoding API or database with GPSCoord and output Location as if it were an actual tag.

Compare https://stackoverflow.com/questions/32875276/reverse-geocoding-in-bash-using-gps-position-from-exiftool

I have thousand of photos organized by date/time and location.  Unfortunately, the sorting was done by Apple's Photo.app, which seems to get either the date/time or the location wrong sometimes.  A feature like this would help me find the ones Apple put in the wrong place and put them back where they belong.

As the link shows, there are other ways to do it, but having it built-in would be amazing.

Alan Clifford

That does seem to be city based.  What happens if you are in the middle of a field in the middle of nowhere or 5 k of the coast in the sea?

Happy Hobo

#2
Some geocode databases will always tell you a city.  Some appear to be more general. 

In 2013, we passed a large cemetery on a highway between cities at 45°15'50.40"N 08°45'37.80"E.  I don't re3call the service I used but it converted those coordinates into "Strada Statale 494,27036 Mortara,Province of Pavia,Italy"

For most purposes, some reliability would be wanted.  For my limited purpose, if it says anywhere in Spain, I'll know the date wasn't when I was in Turkey or Taiwan.

Happy Hobo

#3
Currently, I use exiftool to create a CSV with filename, lat, long, date/time and feed that to https://www.geoapify.com/tools/reverse-geocoding-online

Then I edit the result into a script I can use to update filenames or sort by location or add comment or whatever.

I could write code or script to automate my "edit the result" but I do a lot less of that sort of thing since I retired.

This process is good enough for me.  Even with the manual steps, it only takes a couple of days to straighten out the mess Apple caused on nearly three thousand images and videos.

www.geoapify.com offers an API that could be used instead of the only service.  No charge for less than three thousand queries per day.

Phil Harvey

I don't want to add anything to ExifTool that relies on an external service.

StarGeek actually wrote a config file for ExifTool to do what you want via the Google Maps service, but then Google started charging for the service which made it so that StarGeek's code wasn't useful to the general public.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

dwest4277

Quote from: Happy Hobo on September 14, 2022, 05:46:06 PMCurrently, I use exiftool to create a CSV with filename, lat, long, date/time and feed that to https://www.geoapify.com/tools/reverse-geocoding-online


Hi
Would you be willing to post a line of one of your CSV files that shows how to format the data that is sent to Geoapify?

I have prob 60,000 pics to reverse geocode over the next day/month/year/decade :o  :o  and your methodology seems very doable given a "bit" of time. One I get the data formats, then I get to figuring out the ExifTool commands
Thx
Dean