News:

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

Main Menu

Can't change GPSEventID in Phase One IIQ files

Started by G2, August 17, 2018, 12:40:48 PM

Previous topic - Next topic

G2

Hi,
I'm working with raw .IIQ files from Phase One cameras and ran in a situation where I need to change the value of the GPSEventID tag to a value other than zero. ExifTool finds and reports its current value as shown below:

X:\Data>exiftool -H -G -s -GPS* 32_cap22-40-41.07723593_1530916841077L.IIQ
[XMP]                - GPSEventID                      : 0

However, when I try to change it the tag is not recognized:

X:Data>exiftool -XMP:GPSEventID=1 32_cap22-40-41.07723593_1530916841077L.IIQ
Warning: Tag 'XMP:GPSEventID' is not defined
Nothing to do.


Phil Harvey

ExifTool can't write GPSEventID because it isn't a standard tag that it knows about.

So you will have to create a user-defined tag to write it.  See the example config file for examples and documentation on how to create user-defined XMP tags.

If would be informative if you could post the raw XMP from one of these files.  (ie. the output of "exiftool -xmp -b FILE")

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

G2

Hi Phil,
I wasn't aware of the -xmp switch, thanks for the hint!

I  extracted the XMP record from one of the images and attached it here.

This XMP data comes out of a 100MP metric (meaing calibrated) camera used for aerial photography. What you will find in there, among other things, is the camera calibration parameters and the GPS data embedded in the image. The GPSEventID in particular is a sequential number or index in a table of time marks (the event time) recorded by the GPS triggered by the camera each time the shutter releases.

I'll study the sample config file and how to apply it to my problem and thanks for the quick return!

Best regards,
Guillermo Gallo

Phil Harvey

Hi Guillermo,

Thanks for posting the XMP.  I don't remember ever seeing the aerialgps namespace before -- that is the one you need to add a definition for.

There are also a couple of other PhaseOne-specific namespaces in this file.

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

acwu1

Hi all,

I ran into a similar problem trying to use ExifTool to edit the aerialgps namespace generated by PhaseOne cameras. I believe this config file will allow ExifTool to do what you want to do:

#------------------------------------------------------------------------------
# File:        aerialgps.config
#
# Description:  PhaseOne aerialgps namespace configuration file for Image::ExifTool
#
# Author:        Albert Wu
#
# Notes:        This config file defines a new XMP namespace for the PhaseOne
#                camera 'aerialgps' tags.
#
#              To activate this file, rename it to ".ExifTool_config" and
#              place it in your home directory or the exiftool application
#              directory.  (On Mac and some Windows systems this must be done
#              via the command line since the GUI's may not allow filenames to
#              begin with a dot.  Use the "rename" command in Windows or "mv"
#              on the Mac.)  This causes ExifTool to automatically load the
#              file when run.  Your home directory is determined by the first
#              defined of the following environment variables:
#
#                  1.  EXIFTOOL_HOME
#                  2.  HOME
#                  3.  HOMEDRIVE + HOMEPATH
#                  4.  (the current directory)
#
#              Alternatively, the -config option of the exiftool application
#              may be used to load a specific configuration file (note that
#              this must be the first option on the command line):
#
#                  exiftool -config example.config ...
#
#              For detailed information on the definition of tag tables and
#              tag information hashes, see lib/Image/ExifTool/README.
#------------------------------------------------------------------------------

# The %Image::ExifTool::UserDefined hash defines new tags to be added
# to existing tables.
%Image::ExifTool::UserDefined = (
 
    # Adds new 'aerialgps' XMP namespace to the Main XMP table:
    'Image::ExifTool::XMP::Main' => {
        aerialgps => {
            SubDirectory => {
                TagTable => 'Image::ExifTool::UserDefined::aerialgps',
                # (see the definition of this table below)
            },
        },
    },
);

# This table is referenced through a SubDirectory tag definition
# in the %Image::ExifTool::UserDefined definition above.
# The namespace prefix for these tags is 'aerialgps', which corresponds to
# an ExifTool family 1 group name of 'XMP-aerialgps'.
%Image::ExifTool::UserDefined::aerialgps = (
    GROUPS => { 0 => 'XMP', 1 => 'XMP-aerialgps', 2 => 'Image' },
    NAMESPACE => { 'aerialgps' => 'http://www.phaseone.com/aerialgps/' },
    WRITABLE => 'string', # (default to string-type tags)

    GPSEventID => {},
    GPSIMUPitch => {}, #roll, pitch, yaw values encoded as a string
    GPSIMURoll => {}, #in the format of '[integer]/10000'
    GPSIMUYaw => {}, #(eg. yaw of 183.64 is '1836400/10000')
    GPSIMUYawRef => {},
);


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

-Albert

Phil Harvey

#5
Note that I have just seen a sample with these tags, and GPSIMUPitch/Roll/Yaw should be Writable => 'rational'.  Also, there are a number of missing definitions.  See this post for a more complete config file for the PhaseOne XMP aerialgps tags.

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