Generating place name from long and lat question

Started by BrooksR, May 04, 2025, 04:23:44 PM

Previous topic - Next topic

BrooksR

Can Exiftool read long and lat Exif data and come up with a place name like 'Mount Maunganui' or 'Viaduct Harbour Marina'?  (www.iMazing.com does it somehow)  Thank you.  Brooks  (P.S. I know Exiftool can do country, state, city but am looking for something more specific)
gps.png

Phil Harvey

As shipped, ExifTool has the ability to give you the nearest city with a population of 2000 or greater, but it may be customized to include any place names in the geonames.org database.

See the Geolocation page for more details.

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

BrooksR

Thank you for the information, Phil.  I read the Geolocation page.  A lot of information there!  Can you give an example of how I would customize to return a place name within a city, like a museum?  - Brooks (I'm 71 and was writing FORTRAN when I was 17, but what you've done here with ExifTool is amazing.  And you've done it in a way that others have built from it.  Quite an accomplishment!)

StarGeek

You might first look at the alternate database file, which is larger and covers cities down to 500 population.

For further customization, create a text file called .ExifTool_config in the same directory as exiftool. Copy/paste the code listed under Customization into the file and save it.

You can then add you're own places using the format listed there.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

User-defined locations as StarGeek mentioned are possible, but only feasible for a small number of locations.

The larger picture would require some work to understand what geonames offers, then construct a custom database containing your desired feature codes using the build_geolocation script mentioned in the Alternate databases section of the Geolocation page

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