Populating image headers- Additional metadata information were added to the exchangeable image file format (EXIF) and other imagery headers of each image using Phil Harvey’s ExifTool. The images were grouped by image type (core logs and photographs) into separate folders: 2021-308-FA_CoreLogs (11 images) and 2021-308-FA_CorePhotos (17 images). All information in the scripts were the same among all images, aside from the EXIF:ImageDescription, EXIF:DateTimeOriginal, EXIF:GPSLatitude and EXIF:GPSLongtitude information, as that information varies for each core. A separate script containing that header information was run on each image individually to populate those headers (see the third script). Image header information was also populated for 2021-308-FA_GrainSizeDistributions.jpg in 2021-308-FA_GrainSizeData.zip. However, since this image details grain-size distributions for all collected cores, the third script was not used, along with removing EXIF:GPSMapDatum and EXIF:GPSAreaInformation in the second script.
First, the following command was run on all images in a folder to preserve filenames:
exiftool -P "-XMP:PreservedFileName<Filename" *.jpg.
Second, the following command was run on all images in a folder to populate the first set of headers.
exiftool -IPTC:Credit="U.S. Geological Survey" -IPTC:Contact="gs-g-spcmsc_data_inquiries@usgs.gov" -EXIF:Copyright="Public Domain" -XMP:UsageTerms="Unless otherwise stated, all data, metadata and related materials are considered to satisfy the quality standards relative to the purpose for which the data were collected. Although these data and associated metadata have been reviewed for accuracy and completeness and approved for release by the U.S. Geological Survey (USGS), no warranty expressed or implied is made regarding the display or utility of the data for other purposes, nor on all computer systems, nor shall the act of distribution constitute any such warranty." -XMP:AttributionURL="
https://doi.org/10.5066/P14L5SVG" -XMP:Event="2021-308-FA" -EXIF:GPSAreaInformation="Location of core collection site, GPS coordinates are in NAD83" -XMP:ExternalMetadataLink="
https://data.usgs.gov/datacatalog/metadata/USGS:11f59ca9-28a3-4d5b-bb31-88c76ccfe9c8.xml" -EXIF:GPSMapDatum="NAD83" *.jpg
Third, the following command was run on each image in the folder to populate the unique image headers for each core. This example is for the 2021-308-FA-MK1 core photograph:
exiftool -EXIF:ImageDescription="
https://cmgds.marine.usgs.gov/fan_info.php?fan=2021-308-FA; Core photograph for 2021-308-FA-MK1." -EXIF:GPSLatitude="27.62816" -EXIF:GPSLatitudeRef="N" -EXIF:GPSLongitude="82.73466" -EXIF:GPSLongitudeRef="W" -EXIF:DateTimeOriginal="2021:02:19 00:00:00" 2021-308-FA-MK1.jpg
Fourth, the following command run on all images in a folder to copy information into duplicate tags:
exiftool -P "-XMP-photoshop:Credit<IPTC:Credit" "-XMP-iptcCore:CreatorWorkEmail<IPTC:Contact" "-XMP-dc:Rights<EXIF:Copyright" "-XMP-dc:Description<EXIF:ImageDescription" "-XMP-exif:all<GPS:all" "-XMP-photoshop:DateCreated<EXIF:DateTimeOriginal" "-EXIF:GPSDateStamp<EXIF:DateTimeOriginal" -overwrite_original *.jpg
To read out the imagery header information for a set of images to a .csv file, run the following command after connecting to the unzipped folder containing the images:
exiftool -csv *.jpg > allheaders.csv
Specific tags may be specified with this command, if preferred.