The Sequoia captures 5 images per shot, an RGB JPG and 4 single band TIFs, but only the JPG contains GPS Exif tags. To use the single-band TIFs for multispectral mapping/analysis it’s useful (not technically required) to have them also contain GPS Exif tags.
I’ve written a bash script using exiv2 to do just that. I’m not the best bash scripter, but it seems to work ok. First it removes the timestamps in the filename leaving just the unique sequence number and band name. Then it copies the GPS Exif tags from the RGB to the four TIFs. Finally it moves the images into a subfolder per band (this step is not at all required, I just find it useful).
Use at your own risk!
#!/bin/sh
# Rename - remove timestamp
for img in IMG_*.*; do
newname=`echo $img | sed -r "s/IMG_[0-9]+_[0-9]+_//"`
mv $img $newname
done
# Copy GPS Exif tags from *RGB.JPG to .TIF images
for rgb in *_RGB.JPG; do
for band in GRE NIR RED REG; do
tif=`echo $rgb | sed s/_RGB.JPG/_$band.TIF/`
exiv2 -PEVk --grep GPS $rgb > $rgb.tags
exiv2 -m $rgb.tags $tif
rm $rgb.tags
done
done
# Move into subfolder per band
for band in RGB GRE NIR RED REG; do
mkdir $band
mv *_$band.* $band/
done