News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Logic behind Geotagging

Started by BogdanH, June 08, 2011, 08:30:53 AM

Previous topic - Next topic

BogdanH

Hi,

I've just tried ExifTool geotagging by using NMEA log file and it works -no, I'm not surprised  :). Now, before I start to implement that in GUI and to avoid time consuming experiments, few questions (just to clarify in my head):

1. Because logging happens in time intervals, Exif DateTime values will always differ those from GPS log file. I assume, that (because of this) ExifTool is interpolating Latitude, Longitude and Altitude values from nearby (closest time match) values. That is, in most cases, these three values (and GPSTimeStamp) written inside Exif can't be actually found inside log file. Am I correct?

2. My logger allows logging Latitude/Longitude values only (thus, no Altitude). I haven't tried that option yet, but... if that value is missing in log file, will ExifTool create GPSAltitude tag anyway? If yes, what value will be in there?

3. Assuming my camera has correct local time and logger always uses UTC... As long I'm taking photos in my "local (time) area", there's no need to use -GeoTime option, because ExifTool will automatically know TimeZone difference by using PC's system time(zone). Am I correct?

4. I'm in Moscow and I take photo there at 10:00AM (their local time). Camera is set to their local time as well, thus DateTimeOriginal=10:00:00. Because logger uses UTC, log file will contain time=07:00:00 (Moscow's TimeZone=+3h). When comming home (TimeZone=+1h) I'm geotagging my photo... what -GeoTime value must I use:
+1 -because that's my local TimeZone?
+2 -because that's the difference between Moscow and my (home) TimeZone?
+3 -because that's Moscow's TimeZone?

Added:
Is it possible you would limit GPSAltitude precission to (say) max two decimal numbers? I assume, commercial gps units aren't not even that precise. Speaking for me, one decimal point would be more than enough...

Thanks for taking time to answer.
Bogdan

Phil Harvey

Quote from: BogdanH on June 08, 2011, 08:30:53 AM
ExifTool is interpolating Latitude, Longitude and Altitude values from nearby (closest time match) values.

Correct.  A linear interpolation between the nearest GPS fixes before and after the image time.

Quote2. My logger allows logging Latitude/Longitude values only (thus, no Altitude). I haven't tried that option yet, but... if that value is missing in log file, will ExifTool create GPSAltitude tag anyway?

No.  In this case ExifTool will write GPS tags without altitude.

Quote
3. Assuming my camera has correct local time and logger always uses UTC... As long I'm taking photos in my "local (time) area", there's no need to use -GeoTime option, because ExifTool will automatically know TimeZone difference by using PC's system time(zone). Am I correct?

Yes.

Quote4. I'm in Moscow and I take photo there at 10:00AM (their local time). Camera is set to their local time as well, thus DateTimeOriginal=10:00:00. Because logger uses UTC, log file will contain time=07:00:00 (Moscow's TimeZone=+3h). When comming home (TimeZone=+1h) I'm geotagging my photo... what -GeoTime value must I use:
+1 -because that's my local TimeZone?
+2 -because that's the difference between Moscow and my (home) TimeZone?
+3 -because that's Moscow's TimeZone?

You must specify the timezone for the date/time stored in the image.  In this case: "-Geotime<${DateTimeOriginal}+03:00"

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

BogdanH

That was fast... thanks.
Did you noticed my "Added" comment about Altitude precission?

Bogdan

Phil Harvey

Hi Bogdan,

The Composite:GPSAltitude tag limits the precision to 1 decimal point if this helps.

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

BogdanH

Hi Phil,

Now I am a bit counfused... On my 3rd question you said, that no TimeZone offset (-GeoTime option) is needed to be applied, because PC's system time is the same as set in camera (where PC's system time is set to my TimeZone, which is +1h). To elaborate: i.e. photo DateTime is 10:00h (camera setting for my local time) and log data is 09:00 (because UTC is written) -in such scenario ExifTool will find correct GPS data inside log file and write it into imagefile.
If that's true, then for my 4th question, I don't understand why +3h is needed to be used (I would expect +2h)... Does ExifTool in this case (because -GeoTime is specified) discards PC's system TimeZone ant takes only -GeoTime value into account?

This TimeZone stuff is allready confusing and then my poor grammar... I hope you understand what I'm trying to say. The thing is, in GUI, settings needed to be done, should be easy to understand (so user has no doubts about what he's doing).

Bogdan

Phil Harvey

Hi Bogdan,

Because you are specifying the time zone of the camera, not a time offset from the system time.  The time zone of the camera was +03:00.  If you specify the camera time zone then the system time is irrelevant.  The system time zone is only used if the image time doesn't have a timezone.

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

BogdanH

Hi Phil,

I've succeed to implement geotagging in GUI. Among other things, I also checked what happens if some totally wrong file is picked instead of valid log file. Of course, ExifTool doesn't modify target image files in this case. What user gets in this case, is list of warnings and list of files where "Nothing changed", which can be quite long if many images are selected. How about simple/short "Not valid log file -Nothing changed" message in such case? Just an idea.
And final question: are there cameras, where one can set TimeZone offset and this value is then written by camera in Exif:TimeZoneOffset?

Bogdan

Phil Harvey

Hi Bogdan,

Quote from: BogdanH on June 08, 2011, 04:51:59 PM
I've succeed to implement geotagging in GUI.

Excellent!

QuoteWhat user gets in this case, is list of warnings and list of files where "Nothing changed", which can be quite long if many images are selected. How about simple/short "Not valid log file -Nothing changed" message in such case? Just an idea.

I think you're stuck with this behaviour because adding the code to check for this special case wouldn't be pretty, but I'll look into it in more detail.

Quote
And final question: are there cameras, where one can set TimeZone offset and this value is then written by camera in Exif:TimeZoneOffset?

I haven't seen any.  Unfortunately this isn't standard EXIF.

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