%Image::ExifTool::UserDefined = ( # Composite tags are added to the Composite table: 'Image::ExifTool::Composite' => { # QuickTime GPSLatitudeRefQuickTime => { Name => 'GPSLatitudeRef', Require => 'QuickTime:GPSCoordinates', Groups => { 2 => 'Location' }, ValueConv => 'my @c = split " ", $val; $c[0] < 0 ? "S" : "N"', PrintConv => { N => 'North', S => 'South', }, }, GPSLongitudeRefQuickTime => { Name => 'GPSLongitudeRef', Require => 'QuickTime:GPSCoordinates', Groups => { 2 => 'Location' }, ValueConv => 'my @c = split " ", $val; $c[1] < 0 ? "W" : "E"', PrintConv => { E => 'East', W => 'West', }, }, # GPS GPSDestLatitudeGPS => { Name => 'GPSDestLatitude', Require => { 0 => 'GPS:GPSDestLatitude', 1 => 'GPS:GPSDestLatitudeRef', }, Groups => { 2 => 'Location' }, ValueConv => '$val[1] =~ /^S/i ? -$val[0] : $val[0]', PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")', }, GPSDestLongitudeGPS => { Name => 'GPSDestLongitude', Require => { 0 => 'GPS:GPSDestLongitude', 1 => 'GPS:GPSDestLongitudeRef', }, Groups => { 2 => 'Location' }, ValueConv => '$val[1] =~ /^W/i ? -$val[0] : $val[0]', PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")', }, # XMP # This composite tag and the next are copied from XMP.pm. # Without these copies here, they stop working when this config is # loaded -- I clearly don't understand the mechanism entirely. GPSLatitudeRefXMP => { Name => 'GPSLatitudeRef', Require => 'XMP:GPSLatitude', ValueConv => q{ IsFloat($val[0]) and return $val[0] < 0 ? "S" : "N"; $val[0] =~ /^.*([NS])/; return $1; }, PrintConv => { N => 'North', S => 'South', }, }, GPSLongitudeRefXMP => { Name => 'GPSLongitudeRef', Require => 'XMP:GPSLongitude', ValueConv => q{ IsFloat($val[0]) and return $val[0] < 0 ? "W" : "E"; $val[0] =~ /^.*([EW])/; return $1; }, PrintConv => { E => 'East', W => 'West', }, }, GPSDestLatitudeRefXMP => { Name => 'GPSDestLatitudeRef', Require => 'XMP:GPSDestLatitude', Groups => { 2 => 'Location' }, ValueConv => q{ IsFloat($val[0]) and return $val[0] < 0 ? "S" : "N"; $val[0] =~ /^.*([NS])/; return $1; }, PrintConv => { N => 'North', S => 'South', }, }, GPSDestLongitudeRefXMP => { Name => 'GPSDestLongitudeRef', Require => 'XMP:GPSDestLongitude', Groups => { 2 => 'Location' }, ValueConv => q{ IsFloat($val[0]) and return $val[0] < 0 ? "W" : "E"; $val[0] =~ /^.*([EW])/; return $1; }, PrintConv => { E => 'East', W => 'West', }, }, }, );