# Earth Observation and Biodiversity Big Data for Forest Habitat Types Classification and Mapping
## 2 Materials and Methods
### Data Gathering and Processing
#### 2.3.2 Predictor Variables
For each satellite image, all 10 surface reflectance spectral bands were first spatial resampled at 20 m, to obtain a full consistent set of spectral bands, namely the B2 (blue), B3 (green), B4 (red), B5 (Red edge 1), B6 (Red edge 2), B7 (Red edge 3), B8 (NIR1), B8a (NIR2), B11 (SWIR1), and B12 (SWIR2). Later, pixels corresponding to clouds, cloud shadows, snow, and water in the product quality flag masks or corresponding to topographic shadows (identified by product quality flags representing the topographic mask and low-sun mask, with the latter considering the pixel aspect, slope, and sun zenith angle) were masked out from further analysis. Sentinel-2 MSI surface reflectance spectral bands for the period March-October have been used for the classification. Spectral information from satellite data sensed during late fall and winter period were not considered among the predictors, since they are often hampered by snow cover and topographic shadows, and they have already been demonstrated to have a scarce result on forest habitat detection [55]. However, temporal predictors included the winter period with seasonal statistics (i.e., average, maximum,and standard deviation), since they allowed for the distinction between evergreen and broadleaved forest patterns. In addition to Sentinel-2 MSI spectral bands, four spectral indices were selected to account for green, red, and yellow photosynthetic leaf pigments, during flowering and senescence, which is the period when the plant is curtailing chlorophyll production revealing various accessory pigments [81] and, consequently, determining the starting of fall foliage (Table 2). The Leaf Area Index (LAI), a biophysical index defined as half of the total green (i.e., photosynthetically active) leaf area per unit horizontal ground surface area, was estimated from the surface reflectance data using the biophysical processor [86] available in SNAP software version 7. Finally, for each spectral band and selected index, annual monthly averages were calculated from all of the available satellite images to produce the final set of spectral predictors. Temporal variables were calculated from LAI time series, stacked in a large multidimensional datacube after applying an image co-registration step [87]. LAI time series were later temporally smoothed and daily interpolated using the procedure based on second order weighted polynomial fitting and the Whittaker smoothing, as described in [88]. LAI daily time series were used to calculate the annual (average, minimum, maximum, delta, standard deviation) and seasonal (winter and summer average, minimum, maximum) temporal statistics and to estimate phenological metrics using the method that is described in [89]. The phenological metrics have only been used as predictors for T1 classification (i.e., deciduous broadleaved), since plant phenology of evergreen plants has lower temporal fluctuation in terms of LAI values, which makes their estimation uncertain. Other studies attempted to use EO time series to describe plant phenology in vegetation mapping, without an in-depth exploitation through the phenological metrics estimates [90]. The median value of each temporal variable calculated for the years 2016-2019 has been selected as temporal predictor used for the training, validation and testing phases of the classification algorithm. All of the procedures used to obtain the dataset of predictors were performed using GRASS GIS for the processing of environmental predictors, SNAP for the Sentinel-2 MSI data processing, and R software for the processing of temporal predictors.