*2.2. UAV and Hyperspectral Sensor*

This work was performed with a Matrice 600 hexacopter (DJI) (UAV from now) equipped with a co-aligned VNIR–SWIR hyperspectral (HS from now) system (Headwall Photonics), all property of the University of Cadiz [58].

The HS unit captures continuous information in the 400–2500 nm spectral range, (see [58] for further information). The HS instrument provides VNIR and SWIR data as separate files, but they can be stacked in a single hypercube containing the complete VNIR–SWIR information (see Section 2.4.2).

For data accuracy, the HS system includes an APX-15 GNSS-inertial solution (Trimble Applanix), and the UAV incorporates three built-in GPSs. These GPSs provide an accuracy of ±0.5 m and ±1.5 m in the vertical and horizontal, respectively. However, the postprocessing of the APX-15 data increases accuracy to 0.02 m and 0.05 m, respectively.

#### *2.3. UAV-Based Data Acquisition*

Flight operations were conducted on 22 October 2021 between 10 am and 12 pm with a low tide of 1.3 m LAT (lowest astronomical tide), covering an area of 4.8 ha (Figure 1c). Clear weather ensured uniform lighting conditions for setting the flight and the sensor. The flight mission was planned with UgCS desktop, version 4.5 (SPH engineering). The flight altitude was set at 120 m and the speed at 5 m/s to ensure radiometric quality. This HS sensor does not require frontal overlap, but a 40% lateral overlap was set to assure the subsequent reconstruction of the orthomosaic. The sensor was calibrated by obtaining a reference spectrum in the 400–1700 nm range from a radiometrically calibrated tarp (3 × 3 m). A Reach RS2+ RTK GNSS antenna (EMLID) was used as a base station (see Section 2.4.1). This antenna allows for obtaining more precise results with accuracies of 4 mm + 1 ppm and 8 mm + 1 ppm, in horizontal and vertical measurements, respectively.

### *2.4. Hyperspectral Data Processing*

This section summarizes the processing to generate the HS products (Figure 3). The processing was performed with ENVI, v. 5.3.6 (L3Harris Geospatial Solutions, Inc., Broomfield, CO, USA -.), whereas QGis, v. 3.26.3 (QGIS Development Team) was used for the visualization and handling of raster deliverables. The projected coordinate system used in this work was the ETRS89, UTM zone 29 N (EPSG:25829).

**Figure 3.** Flowchart showing the hyperspectral processing steps. Rounded boxes indicate data or products, rectangle boxes represent processes. Numbers in brackets refer to the respective explanation in the text. SBET: smoothed best estimate of trajectory; MNF: minimum noise fraction; PPI: pixel purity index; n-DV: n-dimensional visualizer; NDVI: normalized difference vegetation index; SAM: spectral angle mapper; ROIs: regions of interest; SVM: support vector machine. See text for details.

#### 2.4.1. Hyperspectral Pre-Processing

Data from the APX-15 is processed with the POSPac UAV software, v. 8.9 (Trimble Applanix), using the data from the antenna to improve accuracy and create the smoothed best-estimated trajectory (SBET). This file, with root mean square errors (RMSEs) within 0.02–0.05 m, is used for the orthorectification of the hypercubes (Figure 3(0)).

The VNIR and SWIR data cubes are processed separately using SpectralView, v 3.2.0 (Headwall Photonics) as follows: (1) raw data is transformed to radiance (Figure 3(1)) by subtracting the dark reference from the digital numbers (DNs). The dark spectrum is collected in the field by covering the sensor lens after the mission and is considered sensor noise; (2) the reflectance correction is the conversion of radiance to reflectance (Figure 3(2)). This step is used to build a line of best fit between the radiance of the HS sensor and the reflectance measured on the radiometric tarp [59,60]; (3) the orthorectification (Figure 3(3)) is performed by combining a precision DSM and the SBET from step 1. For this operation, a DSM from Curcio et al. [34] was used, with 0.05 m/pixel resolution and 0.01 m mean accuracy; (4) the processed VNIR and SWIR hypercubes are stitched together (mosaicking, Figure 3(4)) into a single final mosaic that is orthorectified and georeferenced.
