**1. Introduction**

Forests are subject to a variety of disturbances, which are strongly influenced by climate change and human activities [1]. Forest disturbance due to fires is a major challenge for forest management in various ecosystems due to the loss of life and infrastructure, emissions of greenhouse gases, degradation, soil erosion, and the destruction of species, biomass, and biodiversity [1–30]. According to the Intergovernmental Panel on Climate Change (IPCC), climate change tends to increase the risks of major fires on Earth.

Accurate information that is related to the impact of fire on the environment is a key factor in quantifying the consequences of fires on the landscape, planning and monitoring

**Citation:** Pacheco, A.d.P.; Junior, J.A.d.S.; Ruiz-Armenteros, A.M.; Henriques, R.F.F. Assessment of k-Nearest Neighbor and Random Forest Classifiers for Mapping Forest Fire Areas in Central Portugal Using Landsat-8, Sentinel-2, and Terra Imagery. *Remote Sens.* **2021**, *13*, 1345. https://doi.org/10.3390/rs13071345

Academic Editor: Teodosio Lacava

Received: 14 February 2021 Accepted: 27 March 2021 Published: 1 April 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

restoration and recovery activities, and providing relevant data for understanding the dynamics of fire, serving as a basis for future monitoring [31]. After a fire, detailed and rapid knowledge of the level of damage and its spatial distribution are the first desirable information. Accurate and complete data on fire sites and burned areas are important for a variety of applications, including quantifying trends and patterns of occurrences in a variety of natural and social systems [32–41].

The understanding of fire regimes and forest recovery patterns in different environmental and climatic conditions improves the management of sustainable forests, facilitating the process of forest resilience, according to Chu and Guo [42].

In the last decades, the use of remote sensing has allowed unprecedented advances in mapping fire dynamics, mainly to locate the occurrence of fire in time and space, and to quantify the total extent of the burned area. Several remote sensing studies have been carried out to map burned areas on a global and regional scale [10,12,38,39,43–56]. In particular, some authors have studied burned areas in Portugal using remote sensing techniques by [12,47,49,51–53,57–59].

The availability of well-calibrated global remote sensing data since the late 1990s has enabled the production of a variety of global and multi-annual products for burned areas, which are now freely available [60]. Several of these products are based on data from orbital sensor systems with different spatial resolutions (coarse, medium, and high), such as: Operational Land Imager (OLI)/Landsat-8, MultiSpectral Instrument (MSI)/Sentinel-2, Advanced Spaceborne Thermal Emission and Reflection Radiometer (ASTER)/Terra, or Moderate Resolution Image Spectroradiometer (MODIS)/Terra. According to Libonati et al. [61], the development of a precise algorithm to detect changes in surfaces that are caused by fires on a global scale is hampered by the complexity, diversity, and high number of biomes involved. The limitations of estimating burned areas, on a global scale, can be reduced with the development of algorithms that consider characteristics, such as vegetation type, soil, and climate, and where validation and calibration exercises are less complex to implement [61].

Mapping burned areas using remote sensing techniques is based on post-fire changes due to the burns [57]. The approaches include supervised and unsupervised classification techniques at the pixel level. The quality of the classification of the natural environment is associated with the precision and reliability derived from satellite data, which are determined by the classification algorithm. This involves the image resolution (pixel, window, or segment size) that is used in the classification process. To evaluate the classifiers and obtain thematic precision, it is necessary to take the different classes of forest identified into account [62]. In the last decades, non-parametric methods, algorithms that are based on machine learning (MLAs), have gained great attention from applications based on remote sensing [63,64], although some of them, such as the k-Nearest Neighbor (kNN), have been used since the 1950's [65–71]. MLAs have become widely accepted as evidenced by their use in mapping burned areas [44,46,72]. They perform well in situations that involve category prediction of spatially dispersed training data and are especially useful when the process under investigation is complex and/or represented by a high-dimensional input space [73].

In recent years, Landsat, Sentinel-2, and Terra data have been used in conjunction with MLAs to distinguish and map fires in different types of biomes, anthropogenic types of land use (including plantations), and degraded forests ([61,74,75]). Many of the classification algorithms have been compared with standard products from burned areas and active fires derived from satellite data, such as MCD64A1 [76], MCD14DL [75], Landsat Burn Area [77], or Fire\_cci [78].

MLAs have also been implemented in satellite data to map fires, examine spectral properties, accurately delineate the area affected by the fire [79], analyze fire severity [72], and carry out precision analysis of the product [43,61]. Some of the most common MLAs for classifying and mapping burned areas include support vector machines (SVM), kNN, and Random Forest (RF) [80,81]. RF, for example, allows for integrating data from different

scales and sources, which explains its wide use in many mapping applications based on satellite images [72]. In particular, several studies show the RF potential that is applied to satellite images for the detection of forest fires [82–88].

The ability of MLAs to distinguish and map different forest types, which have suffered varying levels of fire severity and their consequences across the planet, needs to be further assessed by different orbital sensors. This will support conservation management, being able to serve in places of different territorial extension. However, it should be noted, that there are few published studies on the performance of kNN and RF using different orbital platforms in areas burned by fire at the local scale, especially in Portugal [81,89–92].

In this work, the feasibility of kNN and RF classification algorithms to map areas that are burned by forest fires in a region of native pine vegetation in the municipalities of Santarém and Castelo Branco (central Portugal) is evaluated using Landsat-8, Sentinel-2, and Terra satellite data. The main aims are: (i) to examine the effectiveness of different remote sensing data sources for delineating the area affected by the fire; (ii) to compare, while considering the advantages and limitations of the sensors used, the performance of two MLAs (kNN and RF) that are commonly used to delineate and map forests that suffered fires; and, (iii) to evaluate the structural and spectral properties of the burned area and its influence on the classification.

We found that no significant differences in the burned area are obtained with each algorithm for each image sensor. The classifications carried out using both kNN and RF algorithms mapped the burned areas with high accuracy for the different sensors, regardless of the spatial resolutions and the spectral characteristics of each source data.

#### **2. Materials and Methods**

#### *2.1. Study Area*

Portugal is characterized by a mild Mediterranean climate with climatic variability, involving droughts and desertification in the southern sector, according to Miranda et al. [93]. The majority of burned areas in Portugal (80%) are due to fires, which occur in a small number of summer days (10%) when the atmospheric circulation forms a prominent ridge over the Iberian Peninsula with a strong flow to the south [94].

The study area (Figure 1) covers a 93.4 km<sup>2</sup> fire that occurred on 20 July 2019 in the districts of Santarém and Castelo Branco (central Portugal). In this area, the vegetation of maritime pine and microclimate predominate with prolonged summers, having very limited rainfall. High temperatures reduce the moisture content of forest fuels, often resulting in large fires when combined with strong winds [95].

According to Nunes et al. [96], who analyzed a set of 506 fires that occurred in Portugal in 1991, large fires (greater than 1500 ha) mainly occur in posts of Pinus pinaster, Eucalyptus globulus Labill., and Eucalyptus/Pine trees mixture, and later by bush. On the other hand, as these types of vegetation are sowers, which respond to fire through the rapid dispersion of seeds, post-fire regeneration in the central region of Portugal will crucially depend on the destruction of seeds that are present on the soil surface during the fire episode [97]. Therefore, it can be predicted that the magnitude of fire damage will play an important role in the dynamics of vegetation in this region.

**Figure 1.** Location of the study area at the Santarém and Castelo Branco discricts of Portugal. The analyzed burned area is represented on the right map with a brown pattern. At the bottom are two satellite images from Sentinel 2, corresponding to the RGB mosaics of 29 June 2019 (L1C\_T29SND\_A012075\_20190629T112256), before the fire, and 24 July 2019 (L1C\_T29SND\_A021341\_20190724T112448), after the fire.
