## 2 Materials and Methods
### Pre-Processing and Identification of the Forested Areas
#### 2.2.3 Pansharpening and Subsetting  
Using QGIS (v. 3.34), two separate procedures were carried out to derive two HSI datasets from the HS_DS for classification purposes. For the first HSI (HSII), the original  
Figure 3: This figure shows the main step used to separate tree canopies from other land covers using the MS Péiades data: (**a**) map of vegetated areas with NDVI \(>\) 0.2; (**b**) map of vegetated areas higher than 5 m.  
spatial resolution of 30 m was maintained unaltered. For the second HSI (HSI2), the spatial resolution was increased to 5 m using the panchromatic band, as explained in detail below. Both HSIs were clipped after a precautionary buffer of 1 km was created around the ROI to avoid errors in the subsequent spatial alignment operations harmonizing the various datasets (HS1, HS2, MS_DS, HSI_mask, and GT points).  
HSI1 was obtained through a simple merging of the 205 bands from the PRISMA data. To generate HSI2, four distinct steps were required. In step 1, the 36 bands in the PAN range (400-700 nm) with a GSD of 30 m were selected and merged into a single multiband raster file, keeping the value of the pixels contained in each band separate. In step 2, pansharpening was performed on the merged bands from step 1 using the PAN band as the sharpening band. This was accomplished using the GDAL library in QGIS and the Cubic resampling algorithm (4 \(\times\) 4 Kernel), resulting in a new image with a GSD of 5 m. In step 3, the remaining 169 bands of the HS were merged, as in step 1, and their spatial resolution was reduced to 5 m through a downscaling operation, creating 36 new pixels for each pixel with a GSD of 30 m. In step 4, the pixel values contained in each of the original pixels with a GSD of 30 m in the 169 bands were preserved and reassigned to the 36 new pixels generated within each original pixel. The images produced in step 2 and step 4 were merged into a new multiband raster file, producing HSI2. Figure 4 shows HSI1 and HSI2 before applying the HSI_mask.  
Both HSI1 and HSI2 were subjected to a georeferencing procedure. This was carried out to align the grids of both raster images and ensure that they matched the clipping mask of the wooded areas. The operation was carried out in QGIS using Polynomial 2 as the transformation type and Nearest Neighbor as the resampling method. The GCPs used in this process were collected using the Pleiades VHR image as a reference image.  
Finally, a subsetting selection of HSI1 and HSI2 was performed using the HSI_mask as a filter to remove all pixels that were not of interest for classification. In the selected subset, all HSI1 and HSI2 pixels were retained where at least 30% of the pixel area was covered by  
Figure 4: This figure shows the two PRISMA HSIs clipped on the ROI in natural colors: (**a**) HSI1 with 30 m spatial resolution; (**b**) HSI2 with 5 m spatial resolution.  
the HSI_mask surface, and thus could be considered as corresponding to wooded areas. After trials with 40% and 50%, the 30% threshold was selected as the best trade-off for achieving good classification accuracy while retaining a high number of wooded areas or individual trees. In this way, the values for pixels in wooded areas were preserved, and the NoData class was assigned to the portions of the HSI1 and HSI2 images corresponding to areas not of interest.