ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: efry on February 11, 2012, 03:40:53 PM

Title: GPS AltitudeRef
Post by: efry on February 11, 2012, 03:40:53 PM
In the documentation for the GPS Tags, the Tag with the number 0x0005 is stated:

Tag Name: GPSAltitudeRef
Writable:  int8u
Values:    0 = Above Sea Level
             1 = Below Sea Level
           
If I run the bat-file (Windows XP)
D:\exiftool.exe -k -e -L -f -t -D -GPSAltitudeRef="1" D:\img_8600.jpg
ExifTool returns an error.

If I change the bat file to:
D:\exiftool.exe -k -e -L -f -t -D -GPSAltitudeRef="A" D:\img_8600.jpg
it accepts the value.

Is it an error in the documentation or am I doing something wrong?

Title: Re: GPS AltitudeRef
Post by: BogdanH on February 11, 2012, 03:59:03 PM
Hi,

GpsAltitudeRef tag can only contain numerical value, which can only be:
0 -means, GPSAltitude value is to be represented as "Above Sea Level"
1 -means, GPSAltitude value is to be represented as "Below Sea Level"

To store numerical value, you can use:
exiftool -n -GPSAltitideRef=0 d:\my_img.jpg
or
exiftool -GPSAltitudeRef#=0 d:\my_img.jpg

Because you used ... -GPSAltitudeRef="A".. , ExifTool translated that as "Above Sea Level" (because there can only be Above or Below), and stored value 0 into the tag.

Bogdan
Title: Re: GPS AltitudeRef
Post by: efry on February 11, 2012, 04:23:22 PM
Thank you very much for a very quick answer!

I was not aware, that I needed -n if I was using -GPSAltitudeRef=0 for writing the value as a digit.

-Erik
Title: Re: GPS AltitudeRef
Post by: Phil Harvey on February 11, 2012, 07:11:58 PM
Thanks Bogdan.

Erik: For more on this topic, see FAQ number 6 (https://exiftool.org/faq.html#Q6).

- Phil