1. Introduction
The knowledge of croplands is crucial for ensuring food security, reducing poverty, and managing water resources [
1]. Therefore, stakeholders require accurate agricultural maps to effectively coordinate management plans and policies. Remote sensing offers significant potential for cost effectively classifying and monitoring agricultural regions within a short timeframe and across vast areas [
2]. Sustainable Development Goal (SDG) 2 aims to eradicate hunger by ensuring that everyone worldwide has sufficient and healthy food [
3]. However, achieving this goal is challenging due to climate change and population growth. The problem of food insecurity is most severe in sub-Saharan Africa (SSA).
Various studies of remote sensing systems, such as optical and microwave satellites, have investigated their potential for worldwide cropland mapping. In most cases, they only cover a small geographical area. For example, the Group on Earth Observation Global Agricultural Monitoring (GEOGLAM) and Joint Experiments for Crop Assessment and Monitoring (JECAM) study sites are not larger than 25 km
2. However, it is often unclear whether such studies can be scaled to cover much larger regions for operational purposes, despite their value in representing the capabilities of recent methods and algorithms for crop mapping purposes. In light of this, processing big geodata (such as satellite imagery, often containing thousands of terabytes of data) over a wide area is a critical consideration in the classification process [
1]. However, most classification software packages are unable to accomplish this task. To make large-scale maps and process big geodata effectively, several platforms have been developed, such as Google Earth Engine (GEE).
Remote sensing computing platforms, such as Google Earth Engine (GEE), provide access to datasets and algorithms that provide valuable resources. In addition to image collection, cloud masking, and classification, these tools can be used for a wide range of processing tasks. These resources can be applied across various fields, such as agriculture, where they can generate cropland inventories at regional or national levels [
1,
4] and climate change [
5,
6].
Apart from demonstrating GEE’s benefits and practical uses, there has been a substantial rise in the number of publications on different subject matter [
2,
3,
4,
7]. To date, the use of GEE has been employed in several studies to categorize or produce cropland and other land use on a large scale. Using various datasets, Jun Xiong et al. [
5] created a 250 m cropland mask within GEE that mapped cropland regions in Africa. An automated cropland mapping algorithm (ACMA) was applied by creating ACMA-derived cropland layers for 2014 (ACL 2014). According to their results, significant amounts of cropland were mapped over a large area using GEE. When validated for each of the eight agro-ecological zones (AEZs), the layer showed an accuracy of 89%.
Research conducted in the West African Sahel region utilized Landsat-8 surface reflectance data (Bands 2–7) and various vegetation indices such as MSAVI, NDVI, EVI, and SAVI in conjunction with Random Forest models to detect cropland. The study found that the combined approach yielded 90.1% overall accuracy in cropland detection [
8]. Li et al. [
6] exploited the potential of Sentinel-2 and Landsat-8 images to create a 10 m map of Africa using the Random Forest (RF) classifier. Their results demonstrate an overall accuracy of 81% for five classes. In addition, Ghorbanian et al. [
9] used a RF algorithm to combine Sentinel-1 and Sentinel-2 satellite datasets from different time periods. The study resulted in the creation of a land cover (LC) map for 2019, which demonstrated overall accuracy (OA) and Kappa coefficient (KC) values of 91.35% and 0.91%, respectively. Shelestov et al. [
1] performed a thorough crop classification analysis using Google Earth Engine (GEE) to access numerous multi-temporal datasets. Their work compared pixel-based approaches to crop mapping in Ukraine using different classifiers such as SVM, decision trees, random forests, and neural networks. According to their study, the producers and users were under 85%.
Nigeria encompasses large agricultural areas of about 694,501 sq. km [
10] and is the most populous in the African continent, making the country one of the largest consumers of food crops (maize) in Africa [
11]. Due to Nigeria’s vast and diverse agricultural regions, there are many crops available in Nigeria, and an excellent way to obtain detailed information about a country’s environment is through remote sensing. The agricultural sector needs relevant, timely, and accurate spatial information on agricultural production, domestic and international markets, and the utilisation of biophysical resources and mitigations as well as their relation to global conditions. Thanks to the rapid development of technology, these demands are being met more frequently. Due to these improvements, big geodata is cheaper, more reliable and readily accessible, and easier to integrate and distribute.
In recent years, various studies have examined how remote sensing methods can be applied to agricultural mapping over Nigeria, which has a varied and frequently complicated agricultural terrain. Using Sentinel 1A microwave and Sentinel 2A optical satellite images, Abubakar et al. [
12] conducted a comparative analysis of two machine-learning algorithms, namely RF and SVM. Their work reported that RF outperformed SVM in terms of the robustness of the classifiers. It has been found that the most suitable time to differentiate between different crops is between the months of September and early October. This is when the maize crop is ripening and is ready for harvesting. Esther et al. [
13] also used extremely high-resolution Sky Sat data and multi-temporal Sentinel-2A/B time series to map maize and potato crops and to study how these two crops are grown together on the Jos Plateau in Nigeria. They employed a pixel-based classification algorithm. The study’s findings indicate that identifying cropland using machine learning algorithms resulted in an overall accuracy of 84%. Additionally, the crop type map achieved an average accuracy of 72% for the five relevant crop classes. Finally, Abubakar et al. [
14] applied the RF classifier and multi-temporal Sentinel-2 spectral and textural datasets to map croplands and other land cover classes in Bakori Katsina state, Nigeria. Their outcomes demonstrate that the maximum OA was derived from integrating spectral bands and textural features at scenario 2 SVM_RBF (87.40%).
In reference to the previous paragraph, an extensive literature search has been conducted on Nigeria’s cropland and other land cover classifications. The majority of studies used traditional methods and covered relatively small areas, although it should be noted that the complementary role of microwave satellite data to their optical counterparts in maize mapping has not been fully extended to Sentinel-1 and Sentinel-2 satellite imagery in a large area of the region. Developing and implementing novel methods for maize mapping in (Seasonal crop Inventory) SCI is one of the ongoing priorities of the Nigerian government program, Agricultural Transformation Agenda (ATA). As a result of recent advances in big Geo data and ML processing procedures, substitute approaches might be available for more quickly and accurately generating Nigeria’s agricultural maps. In this regard, new ML algorithms and cloud computing techniques must be investigated to produce an accurate SCI map in an automated and operational manner. We therefore aim to classify maize crops and other land cover classes across three states of Nigeria for the first time using GEE and machine learning (RF, SVM, and CART) methods. Sentinel-1 and Sentinel-2 satellite images were obtained in 2016, 2017, 2018, and 2019. The data from these images were used to produce SCI maps and other land cover classes with a 10 m spatial resolution.
3. Methodology
The framework illustrated in
Figure 3 outlines the methodological workflow for the study’s seasonal crop inventory (SCI) mapping based on a machine-learning algorithm and Google Earth Engine.
3.1. Sentinel-1 Pre-Processing
IW modes associated with VV+VH polarisation over land are mainly conflict free. Hence, the GRD images obtained in IW mode with a spatial resolution of 10 m and ascending orbit were employed. Moreover, HH and HH/HV channels are deliberately intended for polar environments. Thus, they were uncommon in tropical areas such as Nigeria; therefore, VV and VH channels were employed.
As part of this study, Sentinel-1A images from (GRD) products within GEE were retrieved (Image Collection ID: COPERNICUS/S1_GRD). We utilized a cloud-based geospatial analysis platform known as GEE to process the products for analysis. This powerful tool enabled us to solve problems efficiently, making our processing more streamlined and effective. This system is ideal for processing and analysing earth observation data. The pre-processing of Sentinel-1A followed a chain that commenced with (a) applying orbit file to enhance geometric consistency in the image time series, (b) GRD border noise removal, (c) thermal noise removal in all images, (d) radiometric calibration to sigma nought (0°) backscatter coefficients (dB), and (e) terrain correction. The next step involved is then Boxcar filtering, and the subsequent VH and VV polarisation datasets were subset to the extent of the study area.
3.2. Sentinel-2 Pre-Processing
A cloud-based platform called Google Earth Engine (GEE) was used to pre-process Sentinel-2 images [
2]. GEE is a common architecture for an open-access JavaScript Application Programming Interface (API). It provides cloud computing capability with a multi-petabyte catalogue of remote sensing data, allowing us to process gigantic volumes of data and achieve high results for all earth observation processing and analysis. A total of 188 scenes from Sentinel-2A and B were accessed from the GEE in 2016, 2017, 2018, and 2019, respectively.
In this study, all Sentinel-2 images of minimal cloud cover (<10%) obtained over Kaduna, Kano, and Katsina States of northern Nigeria from early May to October 2016 and 2019 are employed for mapping the maize area and yield. However, due to the frequency of clouds in this subtropical area, only composite images of Sentinel-2A and 2B were used as composite images in all the years under study (2016, 2017, 2018, and 2019), respectively.
One technique was considered for the extraction of spectral–temporal metrics with the belief that it tallies with the research goals. Generally, constructing the base dataset is crucial for any mapping or classification of crops. In this work, the S2 dataset’s composition begins in GEE, starting with a filtered and cloud-masked image collection and ending with final maps.
In this study, seasonal composite imagery was generated using the median reducer, a commonly used image-processing tool, to produce cloud-free composites. The study selected satellite images from three northern Nigerian states based on the region of interest and focused on the summer season, specifically from May to October.
- (i)
Sentinel-2 Data Fetching: Sentinel-2A and 2B of Multi-spectral Imaging (MSI) format are utilized in this study. These were dense time-series Sentinel-2A and 2B data span from May to October of the study years under investigation (2016, 2017, 2018, and 2019) with 5 or 10 day intervals.
- (ii)
The GEE processing interface was utilized to retrieve the Sentinel-2 scenes needed for this research directly from the GEE image collection, negating the necessity of downloading the data to a local computer. This image collection comprises Sentinel-2 scenes.
- (iii)
Cloud Filtering: In this study, GEE’s image collection contains different information about Sentinel-1 and 2 images. This includes acquisition mode, resolution, and pass type, etc. Thus, the selected images are suitable per user criteria known as “cloud filtering.” Using Metadata and Filtering, followed by a spatial subset, the study area is determined in GEE. The images used for this study were all selected from the orbit container of Sentinel-2 in the GEE. Later, the historical data are arranged using the filterdate argument.
- (iv)
Cloud masking (maskS2clouds): The cloud cover for Sentinel-2 (S2) data is typically determined through computation of the QA60 band in conjunction with S2 surface reflectance data, both of which are available in Google Earth Engine (GEE). The QA60 layer, with a 60-m resolution, includes dense and cirrus clouds.
- (v)
Composition creation: The chosen process created in this study, one image collection, including 188 images of the S2 with the “inBands”. In this study, we computed the median bands using the Google Earth Engine (GEE) platform. Additionally, we extracted several commonly used vegetation indices, namely, the Normalized Difference Vegetation Index (NDVI), Bare Soil Index (BSI), Modified Normalized Difference Water Index (MNDWI), Red Edge Position (REP), Modified Chlorophyll Absorption Reflectance Index (MCARI), Weighted Difference Vegetation Index (WDVI), Soil-Adjusted Vegetation Index (SAVI), Structure Intensive Woody Savanna Index (SIWSI), and the Enhanced Vegetation Index (EVI), for each image. The statistical analysis of relative spectral indices is carried out by applying Equations (1)–(8).
- (vi)
Export to Asset: This is the final exporting stage with regard only to the desired bands, also known as (“outBands”), as previously stated. In this application, bands 2, 3, 4, 6, 8, 8A, 11, and 12 were chosen to construct the first S2 dataset.
To generate the final composite image of the study area, it is necessary to compute the median pixel values for each selected band and the composite images. Finally, we then export the bands of the dataset and the composite images to the asset within the GEE.
3.3. Feature Extraction
Sometimes, multi-spectral satellite images such as optical (Sentinel-2) and microwave (Sentinel-1) derived ones are often of a high correlation, similarity, and repetition [
9]. As a result of the “curse of dimensionality” or the “Hughes effect,” there is an increase in positive correlations between adjacent bands [
18]. An increase in the number of bands in an image would result in a tenfold increase in the number of observations required to train a classifier. Prior to performing the classification, the most significant or most useful feature (S1 and S2) datasets were chosen. As a result, data redundancy and correlation would be reduced.
In order to select optimal features for classification, we used the Gini index derived from the RF [
12]. In ensemble machine learning, multiple trees are combined. In a test classification, two-thirds of the training records are applied for constructing the trees, and the remaining records are used for an “out-of-bag error”. The Gini impurity criterion for descendent nodes for RF training is less than that for the parent node whenever a split is conducted on a variable. Overall, trees are in the classification forest, and the importance score represents the sum of each variable’s Gini decreases. We used the RF method to calculate Gini importance scores in GEE.
3.4. Maize and Other Land Cover Classification
3.4.1. Random Forest (RF)
RF is an ensemble classifier, using a vast number of single decision trees to overcome single decision tree weaknesses [
13,
19]. Each unknown is assigned a final class based on the majority “vote” of all trees. Rather than relying solely on one tree to achieve optimum results, this approach incorporates a number of trees to achieve a global optimum. By incorporating many trees, a global optimum should be attained, thereby overcoming the problem that any one tree may have caused. The concept is further expanded by generating a random subset of training data for each tree; an element of this tree is selected based on a subset of its variables. A large amount of data can be classified efficiently with this classifier while handling imbalanced input features [
20]. In RF classification, two main parameters are needed: the number of classification trees and the number of input features to use. Using the tune function, we determined the optimal parameter randomly. In this study, we determined the optimal number of trees to be 100, while the ideal number of datasets (mtry) was established as the square root of the total number of datasets. One of the strengths of RF is its ability to detect valuable information in each feature. In terms of efficiency and accuracy, RF classifiers possess the best results. One of its disadvantages is that many trees render trees ineffective at being visualized [
21]. The classification was performed using the RF classifier from GEE [
2].
3.4.2. Support Vector Machine (SVM)
The Support Vector Machine (SVM) is a powerful machine learning algorithm that has been successfully employed in the classification of remote sensing images [
22,
23,
24]. Support vector machines have gained significant popularity in remote sensing applications for crop mapping, primarily due to their high success rate in classification [
25]. An SVM is a method for non-parametric statistical learning [
23]. SVM utilizes various types of kernels to transform nonlinear boundaries into linear ones, thereby enabling the determination of optimal hyperplanes in high-dimensional space. This approach has proven highly effective, allowing SVM to achieve remarkable accuracy in classifying complex datasets. [
23,
26]. As an integral component of its strategy, Support Vector Machine (SVM) obtains an optimal hyperplane from the training data of two or more classes within the feature space. This is achieved by maximizing the margins between the hyperplane and the closest training samples, enabling data classification with remarkable accuracy [
27]. Radial basis function kernels are generally easier to define and give good results relative to other kernels when mapping crop types and land-use/cover mapping [
28,
29]. SVM classification accuracy is heavily dependent on the penalty parameter (
C). Further, an SVM model uses a high value of C results in a more accurate prediction. Thus, we select a high value of 100. Conversely, the value of the gamma parameter was established as the inverse of the number of spectral bands. It plays a crucial role in the SVM algorithm, as it determines the degree of influence each training example has on the decision boundary. This study employed an open-source and free GEE platform to handle raster images.
3.4.3. Classification and Regression Tree (CART)
In 1984, Breiman et al. [
21] proposed classification and regression trees (CARTs) [
30]. CART is an algorism that can be employed for both classification and variable predictions. It is similar to RF. This approach uses supervised machine learning and employs training samples to construct trees in order to solve the classification problem. In other words, the CART algorithm divides data into subsets at each tree node based on the normalized information gain, which is the defining attribute of the split. A final decision is then made based on the attribute with the highest normalized information value. As a result, CART is often used to classify remote sensing data. A minimum number of leaves and a maximum number of nodes are set in GEE.
3.5. Accuracy Assessment
In order to accept a classification result, it is crucial to evaluate the accuracy of the result [
31]. As a general rule, accuracy is measured by the degree of agreement between the results and the values assumed to be true [
32]. Confusion matrices were applied to determine the overall accuracy (OA), producer accuracy (PA), and user accuracy (UA) of crop and land cover maps [
31]. The overall accuracy is generally based on the number of correctly classified reference pixels compared to the number of correctly classified pixels. As Congalton and Green [
33] state, analysing the confusion matrix to determine the causes of differences can be a very relevant and fascinating step in constructing a remote sensing map. Maize and other LC classifications are evaluated using a confusion matrix built into GEE. Using this matrix, the output classification is compared statistically with the maize and other LC associated with the validation points. The error matrix was computed using Equation (9).
3.6. F-Score
F-Score is employed to evaluate classified maps. A statistic measuring accuracy based on the confusion matrices (accuracy assessment statistics) for each class has been calculated using Equation (10). The F1-score is computed as the harmonic mean of precision and recall, which are two fundamental metrics used to measure both producer and user accuracy. It is an essential indicator for evaluating classification models compared with independent producer and user indicators [
34]. In terms of accuracy, both producers and users have their own shortcomings. A high threshold will result in high producer accuracy, but there will be a lot of data loss; a low threshold will result in high user accuracy but inaccurate predictions. In this way, the F1-score allows a more comprehensive classifier evaluation while simultaneously allowing for producers and users to be balanced. The F1-score was computed using Equation (10).
In this case, PA represents the accuracy of the producer, and UA represents the accuracy of the user.
5. Discussion
In recent years, the field of remote sensing (RS) has experienced exponential growth due to advancements such as new satellites, increased sensor resolutions, and the availability of massive free data archives. Furthermore, the increased computational power of computers has made it possible to process and analyze large amounts of data quickly. Google Earth Engine (GEE) is a free, open-source platform that has been highly successful as a geospatial analysis and modeling tool thanks to its vast archive of ready-to-use data. GEE allows users to easily access, analyze, and visualize geospatial data. This study demonstrates how combining GEE, machine learning (ML) algorithms, and geographical pixel-based analysis can create multi-temporal composite images for streamlined crop classification processes. The results show that this approach can be highly effective, providing an efficient and straightforward way to process complex image data.
In this research paper, a user-friendly, freely accessible GEE code was developed that integrated microwave data derived from Sentinel-1, optical data derived from Sentinel-2, and machine learning (ML) algorithms. The code allows users to set and adjust various input parameters and compare results obtained from different classification approaches, such as Random Forest (RF), classification and regression trees (CART), and support vector machines (SVM). The same input dataset and classification algorithm are used, making it easy to visually compare the output maps of maize and other land covers. The accuracy matrix of a given study area can also be analysed to determine the effectiveness of the classification approach. The results of this study confirm previous findings [
20] that the RF algorithm provides higher accuracy than CART and SVM algorithms in most cases. This integration of microwave and optical data with ML algorithms in a user-friendly GEE code represents a significant advancement in the field of remote sensing, providing researchers with a powerful tool for analysing and classifying land cover data. RF is not always the best option for accuracy. Studies have shown that, in some cases, other algorithms may perform better than RF, especially when dealing with imbalanced datasets. In addition, algorithms depend on the size and complexity of the data, the computational resources available, and the specific goals of the analysis. Despite the benefits of RF for many situations, it cannot be considered a one-size-fits-all classification solution. Researchers and practitioners should carefully consider its strengths and limitations before selecting a machine learning algorithm that best fits their needs and objectives [
35].
The accuracy of classification models depends heavily on the number and quality of the training points and the validation points used. As a result of the significant challenges that the study areas have faced in recent years, it has been challenging to collect reliable and comprehensive data from these areas due to the lack of resources available. The challenges include insecurity in the form of armed highway robbery, cattle rustling, kidnapping for ransom, and raiding villages, which have caused extensive damage to families and communities. Furthermore, these challenges have deepened mistrust along the traditional fault lines of ethnic and religious differences, making it challenging to collect data from some areas. Despite these challenges, there is an opportunity to use the computational potential of Google Earth Engine (GEE) to quickly acquire training points and validation points without physically traveling to all regions. This approach could pave the way for the possibility of exploiting the vast amounts of data available through GEE to train and validate classification models accurately. The advantage of this method is that it enables researchers to access up-to-date, high-resolution satellite imagery and process large amounts of data quickly and accurately. This approach could be advantageous in regions where security challenges make physical data collection difficult or impossible.
There is a similarity in spectral properties between maize and other crops. Based on our study, we identified six classes, but some of them had similar physical and spectral characteristics, making it difficult to distinguish them. Our analysis of the classes was based on the use of spectral and SAR features over multiple periods (from 2016 to 2018). The results showed a significant overlap between the pixel values of maize and other croplands, which led to difficulties in accurately classifying these classes. It was observed that there was considerable confusion between some of the classes, which was in agreement with the confusion matrix (
Table 2) as well as the final SCI map (
Figure 7). Furthermore, a few misclassifications were observed, which is a strong indication that further developments could be made to the classification algorithm. The study highlights the importance of combining different types of data, such as optical and SAR imagery, to overcome the limitations of individual data sources and improve the accuracy of land cover classification.
6. Conclusions
The primary objective of this study was to create a comprehensive classification and mapping maize cropland and other land cover classes in the northern region of Nigeria. The research serves as a pioneer study in Nigeria that examined the potential of the Google Earth Engine platform and machine learning techniques using satellite imagery such as Sentinel 1 and Sentinel 2 in the maize-producing states of northern Nigeria in 2016–2019. We applied GEE to identify maize cropland and other land cover classes in three Nigerian states using different classification algorithms, including Random Forest (RF), Support Vector Machine (SVM), and Classification Regression Trees (CART). The study indicated a comprehensive classification of heterogeneous smallholder fields in the study areas of Kaduna, Kano, and Katsina states. Therefore, the present study demonstrated the versatility and reliability of using Google Earth Engine (GEE) for cropland mapping. To validate the results, the average overall accuracy for 2016–2019 was 97%, and the average producer and user accuracy for maize crop classes were approximately 98% and 93%, respectively. This level of accuracy is above satisfactory and is reliable for pioneer research that utilizes GEE to create a Seasonal Crop Inventory (SCI). The method employed is a technological advancement that is cost-effective and efficient. The utilization of the proposed method and the study’s findings could have significant implications for Nigerian Cropland Inventories (NCI) development and for the detection and monitoring of changes, as demonstrated in this study. Therefore, for future research, a more accurate and reliable SCI map can be produced by considering that despite attaining a high level of overall accuracy, collecting additional field data is necessary to accurately map other crop categories. Therefore, future studies could improve the class accuracy with a better algorithm for mapping various crops in non-cropland areas. The Seasonal Crop Inventory maps of other regions in Nigeria could also be produced. In addition, future studies classifying cropland could utilize high-resolution satellite images such as Quick Bird, GeoEye, and WorldView for improved classification accuracy.