Land Cover Classification
& Accuracy Assessment
with optical data
using Random Forest Classifier
in Google Earth Engine
This hands-on tutorial is part of a series of online learning materials.
Towards Zero Hunger will give you insights into the potential of remote sensing technologies to support the United Nations’ Sustainable Development Goal 2: Zero Hunger.
This tutorial will teach you how to create a land cover map and assess its accuracy in Google Earth Engine. You will work with optical data from Landsat 8, starting with loading the analysis-ready data for the region of interest and preparing it for classification. You will then utilize a supervised classification algorithm, Random Forest, to generate a land cover map based on optical information. You will assess the accuracy of the classification with error matrices and kappa statistics based on the test data, which are the pixels randomly selected among the training set.
This tutorial is part of the NASA Applied Remote Sensing Training Program (ARSET). Original creators: Zach Bengtsson, Britnay Beaudry, Juan Torres-Pérez, & Amber McCullum
The original content can be found at:
NASA-ARSET Training: Using Google Earth Engine for Land Monitoring Applications
Part 2: Land Cover Classification and Accuracy Assessment in Google Earth Engine
On ARSET’s training site, you will find a video providing step-by-step instructions and explanations for the tutorial. The first part of the video provides the relevant background information. It explains what classification is, how it works, what types of classification methods there are, and in particular how Random Forest works. You will also find the presentation slides and Q&A Transcript from the course.
Note that there are some updates in the version provided here. For instance, USGS Landsat 8 Surface Reflectance Tier 1 data is deprecated and replaced by USGS Landsat 8 Level 2, Collection 2, Tier 1. The cloud masking function is adapted to the new dataset (Stack Exchange, n.d.).
SDG 2: Zero Hunger Relevance
Land-use and land-cover maps are essential tools for decision-makers in formulating policies for sustainable development. Owing to continuous data acquisition at repetitive intervals, EO data enables the evaluation of the static (types, area, and arrangement) and dynamic attributes of land cover (rates of change).
Land cover maps can be utilized for Zero Hunger targets 2-3, 2-4, and 2-C by providing information on the distribution of land cover types, their extent, and their change in time. Moreover, they can reliably and consistently contribute to the monitoring, and reporting of the SDG indicator: 2.4.1 Proportion of agricultural area under productive and sustainable agriculture.
For more detail check the documentation ‘Specifications of land cover datasets for SDG indicator monitoring from (Carter & Herold, 2019) on:
Explore below the SDG 2: Zero Hunger relevance of applications related to
- Crop & Grazing Land Monitoring – Agriculture & Livestock
- Forest & Water Monitoring – Forestry & Agroforestry – Fishery & Aquaculture
- Environmental Monitoring – Agriculture & Livestock – Forestry & Agroforestry – Fishery & Aquaculture
This topic was created with the help of learning materials that were kindly provided by:
- NASA Applied Remote Sensing Training Program (ARSET): Bengtsson, Z.; Beaudry, B.; Torres-Pérez, J.; McCullum, A. (2021). Using Google Earth Engine for Land Monitoring Applications.
- Bengtsson, Z., Beaudry, B., Torres-Pérez, J., & McCullum, A. (2021). Using Google Earth Engine for Land Monitoring Applications. NASA Applied Remote Sensing Training Program (ARSET).
- Carter, S., & Herold, M. (2019). Specifications of land cover datasets for SDG indicator monitoring. https://ggim.un.org/documents/Paper_Land_cover_datasets_for_SDGs.pdf
- Stack Exchange. (n.d.). How to make a cloud-free composite for Landsat 8 Collection 2 surface reflectance in Earth Engine. Retrieved May 15, 2023, from
Towards Zero Hunger Modules
If you want to find out more about EO and different production systems, approaches, or applications, you can choose from the courses below.