Bookmarks

Performing Cropland Land Cover Classification in QGIS Using Landsat 8

avatar
Michael Johnson
post-picture

This tutorial outlines a complete workflow for classifying cropland land cover using Landsat 8 imagery and version 2.3.2 of the Semi-Automatic Classification Plugin (SCP) for QGIS. The study area is located in the U.S. state of Kansas, near the city of Ulysses, and is characterized predominantly by agricultural fields. The goal is to demonstrate a semi-automatic classification process in which the full satellite scene is categorized based on user-defined training samples, known as Regions of Interest (ROIs).

The Landsat 8 image used in this exercise was acquired in April 2013 and is available through the U.S. Geological Survey. The classification approach relies on representative spectral samples to automatically assign land cover classes across the entire image.

Before beginning the classification, it is helpful to review visual material describing the study area and to examine a false-color composite. Healthy vegetation strongly reflects near-infrared radiation, making false-color imagery particularly effective for interpreting cropland distribution.

Pre-Processing: Converting Digital Numbers to Reflectance

Satellite imagery initially stores pixel values as Digital Numbers (DN), which must be converted into physically meaningful reflectance values before analysis. Reflectance expresses the proportion of incoming electromagnetic energy that is reflected by a surface. Converting DN to Top of Atmosphere (TOA) reflectance improves comparability across scenes and supports more reliable classification.

Atmospheric conditions influence recorded satellite signals through absorption and scattering. Applying atmospheric correction during preprocessing reduces these distortions. The Semi-Automatic Classification Plugin provides a built-in implementation of the DOS1 (Dark Object Subtraction 1) correction method. This image-based approach adjusts reflectance values and enhances classification accuracy, particularly in shorter wavelengths such as the blue band.

GRASS GIS also offers tools for TOA reflectance calculation (e.g., i.landsat.toar) and alternative DOS methods. In this workflow, however, preprocessing is completed entirely within SCP.

The Landsat subset used here includes six 16-bit raster bands:

  • Band 2 (Blue)
  • Band 3 (Green)
  • Band 4 (Red)
  • Band 5 (Near Infrared)
  • Band 6 (Shortwave Infrared 1)
  • Band 7 (Shortwave Infrared 2)

Steps for Reflectance Conversion

Open QGIS and launch the Semi-Automatic Classification Plugin.

Navigate to Pre processing > Landsat.

Select the folder containing the Landsat bands and the associated MTL metadata file.

Choose an output directory for the processed reflectance bands.

Enable the option for DOS1 atmospheric correction.

Execute the conversion process.

Once complete, the corrected reflectance bands load automatically into QGIS.

Defining Classification Inputs

To facilitate interpretation of cropland, create a false-color composite using the combination RGB = 5-4-3. This configuration (equivalent to 4-3-2 in Landsat 7) emphasizes vegetation vigor because near-infrared reflectance is displayed prominently.

Create a virtual raster using bands 3, 4, and 5 via Raster > Miscellaneous > Build Virtual Raster. Ensure bands are added in ascending order and configured as separate layers.

Next, define the band set within SCP. Open the Band Set tab, select all relevant reflectance bands, and add them to the classification set.

A training shapefile must then be created to store ROIs. Within the ROI creation panel, generate a new polygon shapefile (e.g., ROI.shp) to record sample areas representing each land cover category.

Creating Regions of Interest (ROIs)

Accurate classification depends on representative and homogeneous training samples. ROIs are created using a region-growing segmentation process, which groups similar neighboring pixels.

The following land cover classes are defined:

  • Crop (green vegetated fields)
  • Low vegetation (bare or sparsely vegetated fields, shrubland)
  • Built-up (urban or artificial surfaces)
  • Farms (farm complexes)
  • Bare soil
  • Water

Because cropland appears in varying shades of red within the false-color composite, multiple ROIs should be drawn for each spectral variation.

To generate an ROI:

  • Click the ROI creation tool and select a pixel representative of a class.
  • Adjust Minimum ROI size and Range radius if necessary.
  • Assign a descriptive label (e.g., crop) in the Information field.
  • Assign a unique class ID. A structured ID system is recommended (e.g., 11–19 for crop, 21–29 for low vegetation, etc.).
  • Save the ROI to the shapefile.

The Spectral Signature tool within SCP allows visualization of ROI reflectance curves. Examining mean values and standard deviations helps avoid selecting spectrally overlapping samples.

Running the Classification

Before finalizing results, conduct classification previews to evaluate performance. A common issue in agricultural landscapes is confusion between bare soil and built-up areas.

Using the Classification dock:

  • Set preview size (e.g., 500 pixels).
  • Select a preview area within the image.
  • Apply the Spectral Angle Mapping (SAM) algorithm.

To improve interpretation, assign meaningful colors to each class. In the layer properties, choose Singleband pseudocolor and customize labels and symbology according to ROI classes. Save the style as a QML file for reuse.

Once satisfied with preview accuracy, execute the full classification and export the result as a GeoTIFF (e.g., classification.tif).

Assessing Classification Accuracy

Accuracy assessment is essential to evaluate classification reliability. Although this example is instructional and does not incorporate field validation, accuracy can be estimated by comparing classified pixels to training ROIs.

Within Post processing > Accuracy, select the classification raster and the ROI shapefile. Generate the error matrix to calculate overall accuracy, omission errors, and commission errors.

In this case study, overall accuracy reached approximately 91.4%, exceeding the commonly accepted 80% threshold for satisfactory performance. However, true operational assessments should incorporate independent validation data.

Reclassification and Area Statistics

Because each ROI was assigned a unique ID, the classification contains more categories than the main land cover classes. To estimate class areas, reclassify the raster into broader categories.

Using SAGA’s Reclassify Grid Values tool:

  • Select the classification raster.
  • Define a lookup table mapping ROI ID ranges to consolidated classes.
  • Execute reclassification.

Afterward, generate a Classification Report within SCP to calculate area and percentage for each land cover category.

In this demonstration:

  • Crop class covered approximately 738 km² (about 10% of the study area).
  • Low vegetation accounted for roughly 6,231 km² (about 87%).
  • Farms occupied about 14 km².
  • Built-up areas represented around 18%.

These figures are illustrative and reflect tutorial conditions rather than field-validated analysis. More precise estimates and crop type differentiation would require ancillary data and ground surveys.

Conclusion

This workflow demonstrates how open-source tools such as QGIS and the Semi-Automatic Classification Plugin can efficiently perform land cover classification using Landsat 8 imagery. By converting DN to reflectance, applying DOS1 atmospheric correction, defining representative ROIs, and evaluating classification accuracy, users can generate meaningful cropland maps with minimal cost.

Such methodologies are valuable for land monitoring, agricultural assessment, and precision farming applications, highlighting the practical potential of satellite-based classification in open geospatial environments.

Read more