Populating image headers: Credit, contact information, copyright, usage terms, image descriptions, attribution url, metadata link, and georeferencing information were added to the exchangeable image file format (EXIF) header of each image using Phil Harvey’s ExifTool (version 12.44). The images were grouped by image type (core logs, photographs, and x-rays) into separate folders: 2021-312-FA_CoreLogs (16 images), 2021-312-FA_CorePhotos (13 images), 2021-312-FA_CoreXRays (9 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). The core logs and photographs are published as JPGs, whereas the core x-rays are published as TIFs. Therefore, all mentions of the file extension in the example scripts below used ".TIF" rather than ".JPG" for the x-ray images. Image header information was also populated for 2021-312-FA_GrainSizeDistributions.jpg in 2021-312-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/P91P1T88" -XMP:Event="2021-312-FA" -EXIF:GPSAreaInformation="Location of core collection site, GPS coordinates are in NAD83" -XMP:ExternalMetadataLink="
https://data.usgs.gov/datacatalog/metadata/USGS:60af5833-a8ba-4a94-a85f-3bca6b652834.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-312-FA-C9_0-65 core photograph:
exiftool -EXIF:ImageDescription="
https://cmgds.marine.usgs.gov/fan_info.php?fan=2021-312-FA; Core photograph for 2021-312-FA-C9_0-65." -EXIF:GPSLatitude="40.69391" -EXIF:GPSLatitudeRef="N" -EXIF:GPSLongitude="72.97954" -EXIF:GPSLongitudeRef="W" -EXIF:DateTimeOriginal="2022:04:20 00:00:00" 2021-312-FA-C9_0-65.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 extract the information from the image headers using ExifTool, run the following command after connecting to the unzipped folder containing the images:
exiftool a.jpg, where 'a' is replaced with the filename. Example: 2021-312-FA-C1.jpg