ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: BrooksR on May 04, 2025, 04:23:44 PM

Title: Generating place name from long and lat question
Post by: BrooksR on May 04, 2025, 04:23:44 PM
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
Title: Re: Generating place name from long and lat question
Post by: Phil Harvey on May 04, 2025, 06:31:55 PM
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 (http://www.geonames.org/) database.

See the Geolocation page (https://exiftool.org/geolocation.html) for more details.

- Phil
Title: Re: Generating place name from long and lat question
Post by: BrooksR on May 05, 2025, 11:59:37 AM
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!)
Title: Re: Generating place name from long and lat question
Post by: StarGeek on May 05, 2025, 12:10:51 PM
You might first look at the alternate database file (https://exiftool.org/geolocation.html#Alt), 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 (https://exiftool.org/geolocation.html#Custom) into the file and save it.

You can then add you're own places using the format listed there.
Title: Re: Generating place name from long and lat question
Post by: Phil Harvey on May 05, 2025, 03:06:23 PM
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 (https://exiftool.org/geolocation.html#Alt)

- Phil