**4. Discussion**

The analyses of hyperspectral datasets from low and medium salt marsh areas in Cadiz Bay are adequate to identify vegetation distribution at the species level. Four plant classes distributed along the horizons of the salt marsh and one class of macrophyte debris were recognised. Three of the plant classes have been associated with monospecific vegetation (*Sarcocornia* spp., *S. perennis*, and *S. maritimus*), while a fourth class represents the mix of species typical of the convergence of distributions (i.e., transition zone). The results from this study are expected to be extrapolated to other mid-latitude tidal marshes since the low and medium tidal marshes of these latitudes usually present similar structural traits [75].

The performance of the SAM classification method is limited in areas with several species due to the mix of spectra [77]. However, this problem can be minimised by using the two supervised classification methods (SAM and SVM) in succession after performing hyperspectral processing procedures. The SVM supervised classification reached up to 98% accuracy, demonstrating its effectiveness in mapping land cover. When looking at the accuracy of individual classes, features such as water bodies and types of soil perfectly match the reference data. Focusing on vegetation classes, the highest accuracy is achieved by vegetation 1, vegetation 4 and macroalgae. The accuracy is lower, although still significant for the remaining classes (Tables A1–A7). The spectral signature of the transition zone (vegetation 3 class), which is a variable mixture of plant species and, therefore, a variable mix of spectra, makes this class the lowest in accuracy (63.16%). Since the training dataset used to produce the map (i.e., ROIs) determines the quality of the algorithm classification, a single ROI for transition zones is considered insufficient to accurately represent the variability associated with different levels of species mix. Still, the overall accuracy provided by our UAV-HS approach is higher than previous classification attempts. Rasel et al. [31] obtained a 43% overall accuracy from space-borne hyperspectral data with 30 m spatial resolution. Rajakumari et al. [28] combined satellite multispectral data and ground spectrometric measurements, achieving 65.8% to 73.55% accuracy for the vegetation and land cover spectral signatures, respectively.

Among the endmembers extracted from Cadiz Bay salt marshes, four exhibit the typical plant pattern, while one shows the macroalgae response with distinct peaks and slopes of the reflectance spectrum. Chlorophyll a (Chl-a), found in both plants and macroalga, determines a typical absorption peak at 669 nm. However, this feature is smoothed in the spectral signature of macroalgae (Figure 5), maybe due to its yellowish-brown colour related to the fucoxanthin content [78]. The class of macroalgae in this study corresponds to debris deposited by an extreme flood event at an elevated position far removed from ordinary tidal cycles. This material dries and decomposes, resulting in high reflectance values in the NIR–SWIR, a typical region where water often attenuates spectral signatures [79]. The reflectance curves of the four remaining classes do not differ much from each other, the only significant variations being in the peak intensity. However, the continuum removal transformation enhances different responses in the 740–864 region, with opposite slopes in the curve between 882 and 949 nm (Figure 7). These findings lead to the acceptance of vegetation 1 and 2 as the spectral signatures of *Sarcocornia* species in the medium marsh horizon, and vegetation 3 and 4 as the signatures of species distributed in the transition and the low marsh, respectively.

**Figure 7.** Results of the continuum removal transformation for the discriminated vegetation classes in the salt marsh of Cadiz Bay. Note that vegetation 1 and 2 have the opposite slope to vegetation 3 and 4 in the 882–949 nm region.

Different species of *Sarcocornia* dominate the medium marsh in Cadiz Bay [55,57]. However, because they are morphologically similar to *Salicornia* species, it is very challenging to distinguish them in the field when they coexist, and misidentification can occur [76]. As revealed by the CR spectra, vegetation 1 and 2 differ almost only in the intensity of the peaks, demonstrating optical similarities. However, the 2nd derivative analysis reveals that two groups of halophytes are spectrally distinct (Figures A1–A4), with these spectral differences resulting from biochemical variations between salt marsh species [28]. The pigment content, canopy structure, leaf area and leaf structure all have an impact on the visible region of the reflectance spectrum of plant canopies [42]. The 2nd derivative of our reflectance curves shows differences in the blue and red regions at wavelengths associated with the chlorophyll and xanthophyll peaks [74]. However, our work shows that the largest 2nd derivative peaks are in the SWIR region, and many of them coincide with water absorption wavelengths. Water absorption bands are present at 900 and 967 nm (the water band index [80]), in the 1150–1260 nm region [81] and in the 1450–1940 nm region [82]. Salinity in soils and vegetation is also detectable in the SWIR region [83,84], and Kumar et al. [85] proposed a SWIR-based vegetation index to detect changes in vegetation cover from satellites. All these previous works support our conclusion that SWIR, with its highest spectral variability, is a suitable region to discriminate plant species from salt marshes. The SI established here can reveal differences in the canopy cover (Figure 6), proving that UAV-HS is able to detect variations in canopy cover at the species level. The great advantages of UAVs are the high spatial and temporal resolutions of their products, as well as greater flexibility and lower cost when compared to satellite products. This allows, for example, data collection immediately after an extreme event and then periodically afterwards, providing key data to assess the ability of dynamic systems, such as salt marshes, to return to previous states (or resilience).

The horizon of the low salt marsh in Cadiz Bay is dominated by *S. maritimus* [55]. Its shoot structure and density allow the soil to be exposed, resulting in a mixed spectrum of soil and plant responses that is very similar to the spectral signature of soil with microphytobenthos. This problem may result in misinterpretations when using low spatial resolution sensors [1]. The higher spatial resolution (5 cm/pixel) offered by UAVs not only prevents this issue, but also reduces the occurrence of mixed spectral signatures due to the reduced pixel size. The comparison of the spectral responses of the *S. maritimus* class (vegetation 4) with the soil classes (Figure 8) shows that the influence of the soil is inevitable. However, *S. maritimus* habitats and soil with microphytobenthos can be distinguished by CR and 2nd derivative transformations in the red-edge and SWIR2 regions (Figure 9). This demonstrates that these two habitats can be distinguished in UAV-HS datasets, allowing for more precise mapping of *S. maritimus* and microphytobenthos soil and minimizing overestimation/underestimation issues for these categories.

The zonation of salt marsh plant species depends on elevation, tidal regime, and the gradient of environmental variables, such as salinity, redox potential, soil N, clay, and organic matter content, as well as interspecific relationships [2,86–88]. According to Redondo-Gomez et al. [89], in SW Spain, *S. perennis* subsp. *perennis* occupies from 2.26 to 2.84 m LAT, and *S. perennis* subsp. *alpini* from 2.84 to 3.65 m LAT. Our results agree with these findings, showing that *Sarcocornia* spp. inhabit the salt marsh horizon between 2.30 m and 2.80 m LAT. Previous studies have described *S. fruticose* and *S. perennis* as dominant species in the salt marshes of Cadiz Bay [55]. Unfortunately, the spectral library available in our study area (FAST project, [75]) does not specify which *Sarcocornia* taxa were measured. However, due to differences in the SWIR region, our results suggest that two *Sarcocornia* taxa coexist in the medium salt marsh horizon. Differences in this part of the spectrum have previously been related to differences in the salinity [84], suggesting that soil salinity may be playing a role in the zonation of Cadiz Bay tidal marshes. Although the elevation ranges for vegetation 1 and 2 overlap, suggesting a similar ecological niche, their different mode (2.67 m for vegetation 1 vs 2.79 m for vegetation 2, Table 3) indicate a shift in the optimum range of environmental conditions between the two groups, supporting the existence of

two species. Both histograms are left skewed, indicating that these species can populate lower elevations despite performing better at higher positions. As a result of our findings, some resilience is expected in these habitats under sea level rise scenarios.

**Figure 8.** Comparison of the spectral responses of the *S. maritimus* class (vegetation 4) and soil classes: reflectance curve (**a**) and continuum removed spectra (**b**). The water vapour absorbance regions (1350–1460 nm and 1790–1960 nm) excluded from the hyperspectral processing are shown in grey.

**Figure 9.** Comparisons of 2nd derivative transformation for the *S. maritimus* (vegetation 4) and soil classes in the red-edge region (**a**) and SWIR2 (**b**).

Regarding the accumulations of macroalgae, the decomposition of these accumulations of organic matter alters the availability of oxygen and the redox potential in the sediments, which could have negative consequences for multiple trophic levels if their incidence increases significantly [90,91]. Understanding the local carbon cycle and the dynamic of the system also requires mapping where macroalgae are deposited [78,91]. In Cadiz Bay, *Sarcocornia* spp. and *S. maritimus* overlap in a narrow area here called the transition zone (vegetation 3). This class has problems with accuracy mainly because of the wide variety of spectral responses due to the different proportions of *Sarcocornia* spp. and *S. maritimus*. Future studies may include more classes for the transition zone, but they will need careful spectral analysis to investigate the spectral response associated with specific proportions of the dominant species.

#### **5. Conclusions**

This study demonstrates the potential of UAV-HS technology to identify and map the distribution of plant species in salt marshes, using canopy reflectance information. Salt marsh plant species have very similar spectral shapes. However, hyperspectral technology is capable of detecting spectral differences associated with the water content and salinity of salt marsh plant tissues. The continuum removal and 2nd derivative transformations can detect hidden spectral features in reflectance curves, which can separate plant species with satisfactory accuracy. The classification map obtained through a supervised process reached up to 98% accuracy. The availability of an accurate DEM allows for the estimation of the preferred elevation range for each specie from the distribution of the corresponding classes. The overlap of species distribution generates mixes of spectra with a large variability associated with different species proportions. Future research may reduce these uncertainties but will require an increase in the number of associated classes.

Vegetation distribution is a key indicator in determining the health of salt marshes. The ability to monitor changes in these distributions will improve our understanding of salt marsh dynamics, our modelling capacity to assess responses to sea level rise, and help stakeholders manage these complicated, vulnerable, and valuable ecosystems. UAV-HS data can be used to evaluate salt marsh vulnerability and strengthen conservation efforts by defining critical areas for conservation and examining pressures on crucial ecosystem services, such as blue carbon.

**Author Contributions:** Conceptualization, A.C.C., L.B. and G.P.; methodology, A.C.C. and L.B.; software, A.C.C.; formal analysis, A.C.C.; investigation, A.C.C.; resources, A.C.C., L.B. and G.P.; data curation, A.C.C.; writing—original draft preparation, A.C.C.; writing—review and editing, A.C.C., L.B. and G.P.; visualization, A.C.C.; supervision, L.B. and G.P.; project administration, A.C.C., L.B. and G.P. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Data Availability Statement:** The data presented in this study are available on request from the corresponding author.

**Acknowledgments:** The authors want to thank all the members of the drone service of the University of Cádiz, which provided all the UAV systems used to carry out the research for this study. The drones service of the University of Cádiz was equipped through the "State Program for Knowledge Generation and Scientific and Technological Strengthening of theR+D+I System State, Subprogram for Research Infrastructures and Scientific-Technical Equipment in the framework of the State Plan for Scientific and Technical Research and Innovation 2017–2020", co-financed by 80% FEDER project ref. EQC2018-004446-P. The authors acknowledge the Program of Promotion and Impulse of the activity of Research and Transfer of the University of Cadiz for the productivity associated with the work. This work is part of the iBESBLUE research project (PID2021-123597OB-I00) funded by MCIN/AEI/10.13039/501100011033/FEDER, EU. Reviewers and editors are acknowledged. All authors have approved each acknowledgment.

**Conflicts of Interest:** The authors declare no conflict of interest.

### **Appendix A**

*Appendix A.1. 2nd Derivative Analysis*

**Figure A1.** The focus is on the VIS region of the electromagnetic spectrum. The main peaks can be identified in the 2nd derivative spectrum of the five studied spectral signatures (**a**). The boxcar average smoothing filter applied on the 2nd derivative spectrum highlights other important peaks for the studied signatures (**b**). Significant peaks are present at wavelengths where pigments influence the spectral response of vegetation: 427,472, 487, 512, 547, 576, 638, 676, 689, and 698 nm.

**Figure A2.** The focus is on the NIR region of the electromagnetic spectrum. The main peaks can be identified in the 2nd derivative spectrum of the five studied spectral signatures (**a**). The boxcar average smoothing filter applied on the 2nd derivative spectrum highlights other important peaks for the studied signatures (**b**). In the NIR region, other important absorbance peaks can be identified at 725, 749, 771, 798, 822, 867, 880, 913, 937, 949, 961, and 997 nm.

**Figure A3.** The focus is on the SWIR1 region of the electromagnetic spectrum. The main peaks can be identified in the 2nd derivative spectrum of the five studied spectral signatures (**a**). The boxcar average smoothing filter applied on the 2nd derivative spectrum highlights other important peaks for the studied signatures (**b**). Significant absorption peaks are present at 1039, 1098, 1128, 1152, 1188, 1206, 1331, 1499, 1523, 1594, 1636, 1672, 1690, and 1774 nm. In grey are the water vapour absorbance regions (1350–1460 nm and 1790–1960 nm) excluded from the hyperspectral processing.

**Figure A4.** The focus is on the SWIR2 region of the electromagnetic spectrum. The main peaks can be identified in the 2nd derivative spectrum of the five studied spectral signatures (**a**). The boxcar average smoothing filter applied on the 2nd derivative spectrum highlights other important peaks for the studied signatures (**b**). The SWIR2 region presents absorbance peaks at 1971, 2007, 2025, 2054, 2114, 2192, 2228, 2264, 2293, and 2335 nm. In grey is one of the water vapour absorbance regions (1790–1960 nm) excluded from the hyperspectral processing.
