Nikon BarometerInfo
Added by Juergen Rose about 5 years ago
I would like to read the BarometerInfo (Altitude) with exiv2. It is possible to get this information with exiftool (Nikon.pm).
An example file is attached.
Replies (4)
RE: Is there a possibility to get the BarometerInfo of Nikon 1 cameras with exiv2? - Added by Robin Mills about 5 years ago
It's in Exif.GPSInfo.Altitude
644 rmills@rmillsmm:~/gnu/exiv2/trunk $ exiv2 -pa --grep bar/i --grep alt/i http://dev.exiv2.org/attachments/download/1060/25850685556_622312410d_o.jpg Exif.GPSInfo.GPSAltitudeRef Byte 1 Above sea level Exif.GPSInfo.GPSAltitude Rational 1 1601 m Xmp.exif.GPSAltitude XmpText 6 1601/1 Xmp.exif.GPSAltitudeRef XmpText 1 Above sea level 645 rmills@rmillsmm:~/gnu/exiv2/trunk $
RE: Is there a possibility to get the BarometerInfo of Nikon 1 cameras with exiv2? - Added by Juergen Rose about 5 years ago
Thanks Robin for your answer. Exif.GPSInfo.GPSAltitude is not the barometric altitude information, but the GPS information. exiftools shows to Altitude values:
rose@lynx:/home/rose/Txt/projects/Robina(163)$ exiftool Testphotos_Exif/Nikon_1/25850685556_622312410d_o.jpg | grep Altitude
Altitude : 1583 m
GPS Altitude Ref : Above Sea Level
GPS Altitude : 1601 m Above Sea Level
i.e., the difference is about 20 m. This difference could be relevant for us. In /usr/lib64/perl5/vendor_perl/5.24.0/Image/ExifTool/Nikon.pm
I find:
- 13) Roger Larsson private communication (tests with D200)
- 14) http://homepage3.nifty.com/kamisaka/makernote/makernote_nikon.htm (2007/09/15)
- 15) http://tomtia.plala.jp/DigitalCamera/MakerNote/index.asp
- 16) Jeffrey Friedl private communication (D200 with firmware update)
- 17) http://www.wohlberg.net/public/software/photo/nstiffexif/
--
CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
WRITABLE => 1,
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PRINT_CONV => \&FormatString,
0x0001 => { #2 # the format differs for different models. for D70, this is a string '0210', # but for the E775 it is binary: "\x00\x01\x00\x00"
Name => 'MakerNoteVersion',
Writable => 'undef',
Count => 4,
--
},
0x00c3 => {
Name => 'BarometerInfo',
SubDirectory => {
TagTable => 'Image::ExifTool::Nikon::BarometerInfo',
ByteOrder => 'LittleEndian',
},
--
Flags => [ 'Binary', 'Protected', 'Drop' ],
Notes => q{
this data is dropped when copying Nikon MakerNotes since it may be too large
to fit in the EXIF segment of a JPEG image, but it may be copied as a block
into existing Nikon MakerNotes later if desired
},
SubDirectory => {
--
WRITE_GROUP => 'NikonScan',
WRITABLE => 1,
GROUPS => { 0 => 'MakerNotes', 1 => 'NikonScan', 2 => 'Image' },
...
%Image::ExifTool::Nikon::FileInfo = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Image' },
FORMAT => 'int16u',
0 => {
--
- ref PH
%Image::ExifTool::Nikon::BarometerInfo = (
%binaryDataAttrs,
GROUPS => { 0 => 'MakerNotes', 2 => 'Location' },
0 => {
Name => 'BarometerInfoVersion',
Format => 'undef4',
Writable => 0,
},
6 => {
Name => 'Altitude',
Format => 'int32s',
PrintConv => '"$val m"', # (always stored as metres)
...
If I interpret this correctly, the BarometerInfo starts with an offset of 0x00c3 in MakerNotes. But I have no idea, how can access this information with libexiv2.
RE: Is there a possibility to get the BarometerInfo of Nikon 1 cameras with exiv2? - Added by Robin Mills about 5 years ago
Please raise an issue and this will be investigated for a future release.
RE: Is there a possibility to get the BarometerInfo of Nikon 1 cameras with exiv2? - Added by Juergen Rose about 5 years ago
I filed the issue at http://dev.exiv2.org/issues/1225 .