Geotagging restriction

Started by giloutho, October 26, 2012, 07:52:16 AM

Previous topic - Next topic

giloutho

Hi Phil,

As I explained in a first post, I use Exiftool as an external library of my program to geotag images taken during paragliding flights.

I have a test folder where images 00..09 were taken before take off, images 10...19 were taken during flight and images 20..29 were taken after landing. Flight started at 12:35 UTC and stopped at 15:43 UTC. Images were taken from 14:04 to 18:41 UTC+2 (France, summer time)

I use Exiftool with normal commands with this argument :
-geosync 12:35:00Z@14:35:00+02:00

Some images of 00..09 series are geotagged and some of 20..29 also. Results are consistent with default values of  GeoMaxIntSecs and GeoMaxExtSecs (1800s)

I want to restrict geotagging only for flight images.

I started the development of ExifTool integration using MacOS. I put a config file in Exiftool directory like this :

# Specify default ExifTool option values
# (see the Options function documentation for available options)
%Image::ExifTool::UserDefined::Options = (
    GeoMaxIntSecs => 120,
    GeoMaxExtSecs => 120,
    CoordFormat => '%.6f',  # change default GPS coordinate format
);

#------------------------------------------------------------------------------
1;  #end


With this parameters of GeoMaxIntSecs and GeoMaxExtSecs, I solved my problem. Only images of 10..19 series are geotagged.

I provide ExifTool as an external library at program installation without any action of final user. With MacOS, no problem for perl, I put ExifTool and config file in the lib folder.

For Windows, it's different, I must provide the stand-alone Windows executable. The config file appears ineffective. For Coordformat no problem, I use a -c %.6f when it's needed. But for GeoMaxIntSecs and GeoMaxExtSecs in the doc page, you explained that : these options have no command-line equivalents.

What is the solution for Windows ? Is it possible to use only command argument to restrict geotagging ?

Phil Harvey

The config file should work fine in Windows.  It must be that for some reason ExifTool isn't finding it.  There are various places you could put it and various ways to specify where it is located.   See the sample config file for details.  If all else fails, there is always the -config option.

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

giloutho

Thank you for your quick answer...

Sorry but I don't know where is the problem with config file.

Under MacOS in Applications Folder, I put a folder Logfly_Lib with perl file ExifTool, config file .ExifTool_config and a subfolder called lib. It's OK

Under Windows, I have a folder Logfly with Logfly.exe and a subfolder called Exiftool with exiftool.exe and config file .ExifTool_config. It's not OK. Exiftool executes but don't load the config file.

I'm trying to use the -config option. I begin with Mac. I remove the config file .ExifTool_config, I put a copy called myconfig.txt in the folder Logfly_Lib with perl file ExifTool. When I try a geotagging, I have an answser Config file not found

Phil Harvey

I thought it should work placing .ExifTool_config in the exiftool.exe directory.  here is a thread with some details about this from a Windows user

If the -config option doesn't find the file, then the file path must be wrong.

If you don't specify an absolute directory (in Windows, something like "c:/some/directory/path/myconfig.txt"), then the path starts from the current working drive/directory.  In the console, the "pwd" command prints the current working directory.  If you are launching exiftool from another app, then determining the working directory may be a bit problematic. 

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

giloutho

Thank you, yes it was a problem of path... No it's OK... config file .ExifTool_config is read.

I have a last problem but I think this is due to my program. I have an error reported by my shell process but geotagging process is now correct.

It's strange because it's correct for others tasks like exif reading, i have no errors and I can retrieve Exiftools informations.