Annual cropland mapping using data mining and OLI Landsat-8

: In the state of Paraná, Brazil, there are no major changes in areas cultivated with annual crops, mainly due to environmental laws that do not allow expansions to new areas. There is a great contribution of the annual crops to the domestic demand of food and economic demand in the exports. Thus, the area and distribution of annual crops are information of great importance. New methodologies, such as data mining, are being tested with the objective of analyzing and improving their potential use for classification of land use and land cover. This study used the classifiers decision tree and random forest with Normalized Difference Vegetation Index (NDVI) temporal metrics on images from Operational Land Imager (OLI)/Landsat-8. The results were compared with traditional methods spectral images and Maximum Likelihood Classifier (MLC). At first, seven classes were mapped (water bodies, sugarcane, urban area, annual crops, forest, pasture and reforestation areas); then, only two classes were considered (annual crops and other targets). When classifying the seven targets, both methods had corresponding results, showing global accuracy near 84%. NDVI temporal metrics showed producer’s and user’s accuracy for the annual crop class of 86 and 100%, respectively. However, if considering only two classes, the NDVI temporal metrics reached global accuracy of near 98% and producer’s and user’s accuracy above 94%.


Introduction
Remote sensing, given its synoptic character and data acquisition promptness, stands out as a technique able to monitor the crops throughout their lifecycle. Even though there are several orbital remote sensors with different configurations and resolutions (Toth & Jóźków, 2016), most of the current ones are unable to distinguish different agricultural crops in terms of spectral characteristics (Yao et al., 2015).
To overcome this issue, new approaches such as Data Mining (DM) have been tested to assess and improve spectral differentiation (Grande et al., 2016). DM approach has tools to analyze large amounts of data, allowing the development of a learning mechanism (Vintrou et al., 2013). Another procedure to assist in the multispectral classification of images is the multi-temporal analysis of Normalized Difference Vegetation Index (NDVI) (Rouse et al., 1974) since spectral-temporal profiles are strongly tied to agriculture dynamics (Cattani et al., 2017). This type of approach has been used to classify crop types (Chen et al., 2018) and land cover (Jia et al., 2014).
Among the orbital image classifiers, MLC (Maximum Likelihood Classifier) is one of the most used (Silva et al., 2013). Chen et al. (2018) used MLC to generate a crop/non-crop map on OLI/Landsat-8 images in the state of Mato Grosso, Brazil, with overall accuracy greater than 95% and producer's and user's accuracy over 90%. Jia et al. (2014) when classifying land cover in China obtained overall accuracy of up to 94.6% using the MLC; however, MLC may present limitations, such as incorrect identification of targets with similar spectral classes (Amaral et al., 2009).
Algorithms based on Machine Learning (ML) have been an alternative which achieved extremely efficient results in terms of agricultural target classifications (Valero et al., 2016). The majorly used algorithms are Decision Trees (DT) and Random Forests (RF), or even combinations of them (Lary et al., 2016).
Against this background, this study aimed to compare two orbital image classification approaches. One of them consisted of using data mining techniques to classify a NDVI time series data from OLI/Landsat-8 images. The other was to classify using only spectral information from four image dates.

Material and Methods
The study was conducted according to the steps of Knowledge Discovery in Databases (KDD) process (Fayyad et al., 1996), which is divided into five steps: 1) data selection, 2) preprocessing, 3) transformation, 4) data mining, and 5) interpretation.
The imagery was acquired from the Operational Land Imager (OLI) sensor, onboard the Landsat 8 satellite (WRS-2 Path: 223; WRS-2 Row: 077). This is a region of great agricultural output in the West of Paraná state (Brazil), mainly soybeans and corn crops (Souza et al., 2015).
First, images were reprojected to the Universal Transverse Mercator (UTM) zone 22 South. Afterward, the NDVI was calculated as the ratio of the difference by the sum between the reflectance in the red and the NIR (Rouse et al., 1974). The NDVI is widely used in the agricultural monitoring and mapping since it exploits the vegetation contrast in relation to other targets.
The NDVI of annual agricultural crops range from values close to zero (beginning of lifecycle) to one -maximum vegetative development (flowering, fruiting and grain-filling); then, they decrease to values near zero again (senescence, remains and bare soil), being followed by a new annual crop cycle with the same trend (Cattani et al., 2017). There is little spectral-temporal variation in targets such as cities, reforestation areas and forests, which show mean NDVI values near 1.0 for reforestation and forest, and values close to 0.5 for urban areas. Yet sugarcane fields and pastures have lower spectral-temporal variations compared to other annual crops. As for the water, for lowly reflecting in near infrared, it has NDVI values near or below zero.
The NDVI differences (NDVI SD ) of the Landsat-8 images were summed (Eq. 1) to quantify the spectral-temporal variation of NDVI for annual crops, creating a new variable able to differentiate these surfaces from the other targets. The expression for the NDVI SD is where: NDVI SD -NDVI differences; n -the number of images of the temporal-series; NDVI i -the i image from the temporal series; and, NDVI i+1 -the i+1 image from the temporal series.
Then, the mean, minimum, maximum, standard deviation, coefficient of variation, amplitude, median and sum were calculated for the NDVI time series. These measurements were used as input data for classification along with NDVI SD ones, which from here were called NDVI temporal metrics.
(1) Data mining was performed using the supervised classifiers Decision Tree (DT) and Random Forest (RF) in both image cubes (NC and MC). For comparison, a classification was performed using a Maximum Likelihood Classification algorithm (MLC) in MC.
The DT and RF classification algorithms used here derived from the python scikit-learn library (Pedregosa et al., 2011) for machine learning. This library uses an optimized version of the Classification and Regression Tree Algorithm (CART) (Breiman et al., 1984), which supports meta-variables, also allowing regression. RF is a method that combines k decision trees from the CART; it matches predictors from the trees in such a way that each of them depends on the values of a random vector sampled independently and with the same distribution for all the trees within a forest (Breiman, 2001).
A priori, the Overall Accuracy (OA), which is the percentage of correctly labeled pixels in a dataset, was assessed, in addition to the Kappa coefficient (K) (Cohen, 1960). Both were generated by the classification algorithms to verify the best used.
Accuracies of the produced maps were determined by error matrices. For that, a technique known as sample panel was used; it is characterized by a random distribution of sampling points within the area, with the purpose of surveying the landuse and cover classes of each point (Luiz et al., 2002). Three hundred fifty randomly distributed sample points were used in the mappings, 50 of them per class. Evaluations were carried out visually by Google Earth high-resolution images, with the aid of MC, generating the error matrices for each mapping. From the error matrix, OA and K were calculated.
Other accuracy indices were also determined. One is based on the Producer's Accuracy (PA), which stands for the probability of a given pixel value being a member of a particular class. Another is the User's Accuracy (UA), which is the probability of a pixel classified on the map actually representing that category on the field (Congalton, 1991). To check for significant differences in precision measurements among different classification results, the Z test (Foody, 2009) was used as follows: where: p -(x 1 + x 2 )/(x 1 -x 2 ) P 1 and P 2 -Kappa indices of each method compared; x 1 -number of cases allocated correctly in data classifications with size n 1 ; and, x 2 -number of cases allocated correctly in data classifications with size n 2 .
In this test, it is assumed that if | Z | > 1.96, both classifications are significantly different at p ≤ 0.05 (Foody, 2009).

Results and Discussion
The classifiers showed different performances regarding the mapping of the seven classes of land-use and cover (Figure 1) (2) with two databases (MC and NC). The DT and RF classifier in the MC confused the pasture class with the annual crops ( Figure 1A and B). In turn, the classifiers using the NC ( Figure  1D and E), generated confusion between the sugarcane and the pasture classes. All classifiers were able to identify the Iguaçu National Park in the southeast region of the scene (Figure 1), which represents a large homogeneous and preserved area of Atlantic Forest (Ribeiro et al., 2009).
In the classifications that used the NC, larger amounts of areas classified as the sugarcane class were observed, mainly in the northern region of the study area ( Figures 1D and E). Classifications using NC also identified the largest areas under annual crops, which were concentrated more from west to north of the study area, corroborating the results of other studies (Souza et al., 2015;Zhong et al., 2016). The best mapping accuracy was achieved when the algorithm RF was used, for both MC and NC images. Using a sample panel to classify the entire satellite scene, the mappings with NDVI DT (OA: 84% and K: 0.81) showed the best results, followed by the NDVI RF and MLC (OA: 82% and K: 0.79) ( Table 1).
The MC maps (DT, RF and MLC) obtained low user's accuracy when classifying other targets as city and mainly annual agricultural crops. This was because some agricultural areas were in fallow period, or with the soil turned over; therefore, they are spectrally like urban areas. The RGB MLC achieved the best results for the class Water, showing PA and UA of 100 and 96%, respectively.
Land use classifications using NDVI temporal data had low PA for the forest (DT: 72% and RF: 75%) and UA for reforestation area (DT: 66% and RF: 70%), classifying forest as reforestation areas. Pasture also showed a low value of PA (DT: 73% and RF: 68%). This was mainly due to the misclassification errors between the classes pasture and sugarcane. This issue was also reported by other authors (Xavier et al., 2006;Adami et al., 2012a). For Xavier et al. (2006), this is due to a similarity in temporal behavior of NDVI for both classes.
Regarding the annual crops, the best results were seen when using NDVI temporal metrics both for DT (PA: 86%; UA: 100) and RF (PA: 77%; UA: 100). Likewise, Jia et al. (2014a) observed the best results using NDVI metrics (maximum, minimum and mean values and standard deviation) when compared to phenological metrics (start and end of the growing season, duration, seasonal amplitude and maximum adjusted NDVI) and to spectral data of a single date using images from OLI sensor. According to these authors, this outcome arises from a lack of sensitivity of the NDVI temporal metrics to planting and harvesting periods. For a single image (RGB), the date has relevant influence on results (Senf et al., 2015), as in some areas crops are under development, whereas in others, they have already been harvested. By using NDVI temporal metrics, fewer misclassification errors were found for annual crops, but with misleading interpretations in other classes (mainly between sugarcane with pasture). Therefore, rankings were also evaluated separating only the annual crops from a general class representing the other targets.
The NDVI RF, NDVI DT and RGB MLC classifications showed no statistical difference by the Z test (|Z| < 1.96) with higher accuracy than the others. The same trend was seen for RGB RF and RGB DT, but with the lowest accuracy. Yet the classifiers using NDVI temporal metrics had statistically the same results (Table 2). OA -Overall Accuracy; K -Kappa coefficient; PA -Producer's Accuracy; UA -User's Accuracy Table 1. Accuracy indices generated from algorithms and random distribution of points in classifications using Normalized Difference Vegetation Index (NDVI) temporal metrics (NC) and spectral metrics (MC) and the classifiers Decision Tree (DT), Random Forest (RF), and Maximum Likelihood Classifier (MLC) * -Significant at p ≤ 0.05 by z test; ns -Not significant Table 2. Comparison of Kappa indices by Z test obtained by random distribution of sampling points for classification of urban areas, forest, sugarcane, reforestation, annual crops, pasture and water bodies using Decision Tree (DT), Random Forest (RF) and Maximum Likelihood Classifier (MLC) on Normalized Difference Vegetation Index (NDVI) and temporal metrics (NC) and spectral metrics (MC) Classifications using spectral information (MC) had more classification noise and misleading between annual crops and other targets compared to those using NC metrics (Figure 2). The classification accuracy estimated by algorithms showed good results (OA: 94.4 to 100%, K: 0.98 to 1.0). Nonetheless, the same is not true for accuracy evaluation by means of sample panel. Superior results were achieved by NC classifications both using DT (OA: 98%; K: 0.96) and RF (OA: 96%; K: 0.92) when compared to MC (the best result was with RGB RF; OA: 88%; K: 0.76) ( Table 3).
In the literature there are other authors reporting equivalent results. Using NDVI spectral-temporal metrics, Müller et al. (2015) obtained an OA of 93% while identifying grazing areas on the Cerrado biome. Similarly, Jia et al. (2014b) came to close results with an OA of 93% and K of 0.87 for classification of forest cover by means of NDVI spectral-temporal metrics.
NDVI temporal metrics improved OA by nearly 11% and K by 16%. Thus, statistical values extracted from the NDVI profile showed to be able to improve land-use and cover characterization (Jia et al., 2014a;Valero et al., 2016).
The joining of urban area, forest, sugarcane, reforestation, pasture and water bodies into a single class improved classification results (OA: from 84 to 98%; K from 0.80 to 0.96). This is because there is an increase in misclassifications while trying to differentiate such classes. Thus, by reducing the number of classes, a better classification accuracy can be achieved (Senf et al. 2015).
The NC classification with DT reached high PA and UA (above 96%) for both classes (Table 3). This classification reached a PA of 100% for other targets (i.e. all the points from other targets were correctly sorted) and UA of 100% for annual crops (all points classified as a crop are true). This classification obtained 3.8% error of omission for crops and 4% error of inclusion for other targets.
MC classifications had no statistical differences between each other by Z test (| Z |<1.96) ( Table 4). The same is true for the NC analysis method. Therefore, the differentiation between annual crops and other targets was more influenced by NDVI metrics than the use of classification algorithm.  Table 3. Accuracy indices generated from algorithms and random distribution of points in Normalized Difference Vegetation Index (NDVI) temporal metrics (NC) and spectral metrics (MC) using as classifiers Decision Tree (DT), Random Forest (RF) and Maximum Likelihood Classifier (MLC) for annual crops and other targets R. Bras. Eng. Agríc. Ambiental, v.23, n.12, p.952-958, 2019.

Conclusions
1. The temporal metrics (NC) obtained good producer's and user's accuracies with the annual crop class, while for this class with the espectral metrics (MC) there were more confusions for all the classification algorithms used.
2. Considering only two classes (annual crops/other targets), the classifications using the temporal metrics (NC) obtained higher accuracy than classifications that used the spectral attributes.
3. The classification result depends more on the attribute used than on the classification algorithms.
4. The use of Normalized Difference Vegetation Index (NDVI) metrics information, which shows the phenological variations of the crops, together with data mining techniques, proved to be effective in the differentiation of annual crops from the other targets, generating a precise mapping. Table 4. Comparison of Kappa indices by Z test obtained by random distribution of sampling points for classification of annual crops and other targets using Decision Tree (DT), Random Forest (RF) and Maximum Likelihood Classifier (MLC) on temporal metrics (NC) and espectral metrics (MC) images