GeoLang folder devoid of language files

Started by mikelee33, April 21, 2024, 11:42:26 AM

Previous topic - Next topic

mikelee33

Is there a reason why the current GeoLang folder in 12.83 is devoid of language files? It seems strange, especially as the GeoLang folder in Geolocation500-20240417 contains nearly 5MB worth of language files. The current 12.83 release by Oliver Betz does not even contain a GeoLang folder, as it once did, so this has me even more puzzled.

Many thanks for any insight into this matter.
Mike

Phil Harvey

Hi Mike,

The GeoLang folder shouldn't even be there in 12.83.  Download the alternate database if you want this feature.

I discovered that the GeoLang files in 12.82 weren't as complete as they should be, and rather than make the distribution even larger, I've made this an optional download.

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

obetz

I wonder whether I should incorporate this in my installer. Especially for people installing it to a protected folder (ProgramFiles) it would be awkward else.

How often will data in Geolocation500 change?

Phil Harvey

The geonames database is updated on a daily basis, but I'm thinking I may update the ExifTool databases maybe every couple of months.

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

mikelee33

Thank you Phil, I was confident that there had to be a reasonable explanation, and you furnished it.
If I may... I think your idea about updates every few months (or so) seems reasonable to me.
Mike

obetz

if there are a number of requests to incorporate the larger "alternate" database into my installer, I will consider a solution. OTOH, I don't like to make it even larger.

FrankB

@Oliver, @Phil,

I too have been thinking of adding the larger, alternate, database as an option to ExifToolGui. What has prevented me until now, except lack of time, are 2 things:

1) How do I know what is the most recent database?
- Maybe it's an option to have something analogous to https://exiftool.org/ver.txt for 'Exiftool'?

2) The alternate database must be specified in a config file. I dont like the idea of automatically updating a config file that a user has carefully made. I'm not even sure I can tell what the config file is.
- Maybe it's an option to create a commandline param like '-geodir=<path>'?
- Or another option could be a commandline param like '-appendconfig=<appended_config_file>'. That option should only add lines to the current config, not overwrite them. The <appended_config_file> could contain the line specifying the database.
- Or be able to specify the '-config' multiple times.

Frank

Phil Harvey

Hi Frank,

1) I'm not sure how you want to do this.  The most recent alternate database that I produce will be linked from the geolocation.html page.

2) All you need to do is take the files from the alternate database package and move them into the lib/Image/ExifTool directory.  You don't need to change the config file if you do this.  But this won't work if you want the user to be able to select which database to use.  However, I doubt that you want to include both in your package, so I don't know how you would do this.

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

FrankB

Quote from: Phil Harvey on April 23, 2024, 09:39:22 AM1) I'm not sure how you want to do this.  The most recent alternate database that I produce will be linked from the geolocation.html page.
I was thinking of an 'automated download' performed by the installer. But the link contains a date: https://exiftool.org/Geolocation500-20240417.zip
How can the installer determine what the date is that it should download and install?

Quote from: Phil Harvey on April 23, 2024, 09:39:22 AM2) All you need to do is take the files from the alternate database package and move them into the lib/Image/ExifTool directory.  You don't need to change the config file if you do this.  But this won't work if you want the user to be able to select which database to use.  However, I doubt that you want to include both in your package, so I don't know how you would do this.
- The user being able to select the database would be nice, but not a requirement.
- Copying the database package to 'lib/image' is not that straightforwarderd.

For example if one is using the 'exiftool.exe' as you supply it. The folder will be something like this:

C:\Users\<username>\AppData\Local\Temp\par-746462\cache-exiftool-12.83\inc\lib\Imagewhere par-746462 seems to be a random number, or at least difficult to determine.

Having said this. I have yet to receive the first request for this feature. So it's not a hot topic.

Frank

Phil Harvey

Hi Frank,

I see what you want now.

This file will contain the name of the current alternate geolocation database: https://exiftool.org/geo.txt

And I've added a new, undocumented API GeoDir option to allow you to set $geoDir via the command line.  Note that this option sets the global $geoDir variable that is used only when the geolocation database is loaded.  Once loaded, the only way to change this is to re-run exiftool.

ExifTool 12.84 has just been released with these features.

- Phil

BTW. The random number is the user name in hex.
...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 ($).

FrankB

Great Phil,

Just what I wanted. Thanks a million!

Frank

Edit: Right my username in Hex!

Marsu42

Quote from: Phil Harvey on April 23, 2024, 12:10:35 PMAnd I've added a new, undocumented API GeoDir option to allow you to set $geoDir via the command line.

This is nice to set different db for multiple requests (with running exiftool multiple times) to speed things up a bit - for requesting only large population ppl, a smaller db can be used.

I only stumbled on this by accident, maybe I'm not the only one who can imagine this being documented :-) https://exiftool.org/ExifTool.html#Geolocation

FrankB

For your info. Will be used in ExifToolGui V632.
Testing so far works like a charm.

FrankB

#13
Quote from: Phil Harvey on April 23, 2024, 12:10:35 PMI see what you want now.

This file will contain the name of the current alternate geolocation database: https://exiftool.org/geo.txt

And I've added a new, undocumented API GeoDir option to allow you to set $geoDir via the command line.  Note that this option sets the global $geoDir variable that is used only when the geolocation database is loaded.  Once loaded, the only way to change this is to re-run exiftool.

Hi Phil,

I know you rarely use Windows, but for your info. I just released ExifToolGui V632, and the installer has the option to download the larger DB. Gui itself has been added the option to specify the directory, and if specified it uses the '-API GeoDir'.

https://github.com/FrankBijnen/ExifToolGui/releases

Thanks again,
Frank

installer.jpg