Google Earth Engine Tutorial: Load and Export MODIS Land Cover Data
Credit: Youtube Channel “Terra Spatial, Guide on accessing MODIS land cover data and exporting it for land use classification studies.”
You can see all the tutorials from here: Techgeo Academy.
Google Earth Engine (GEE) is a powerful platform for geospatial analysis that allows users to access vast Earth observation datasets. One of the key datasets for environmental monitoring is the MODIS Land Cover data, which provides global land cover classifications. This tutorial demonstrates how to load and export MODIS Land Cover Data using Google Earth Engine.
Step 1: Access the MODIS Land Cover Dataset
To load MODIS Land Cover Data, start by accessing the correct dataset in GEE. The Multi-Temporal Land Cover dataset is available as MODIS/006/MCD12Q1
. This dataset contains land cover classifications for the past 17 years, updated every 500 meters at 500m resolution.
var landCover = ee.ImageCollection('MODIS/006/MCD12Q1');
Step 2: Filter the Dataset by Date and Region
Use provided methods to filter the dataset to a specific time range and geographic area. For example, to analyze data from 2020 and clip to a study region:
var year2020 = landCover.filterDate('2020-01-01', '2020-12-31');
var region = ee.Geometry.Rectangle([-122.5, 37.5, -121.5, 38.5]); // Example coordinates
var clippedData = year2020.map(function(img) { return img.clip(region); });
Step 3: Visualize the Land Cover Data
To visualize the data, select the relevant band (e.g., ‘LC_Type_1’) and apply a color palette. Here’s an example visualization:
var palette = ['05450a', '08630c', '228b22', '008080', '000080', 'a9a9a9', 'fffff0', '000000', 'ffffff', '7fffd4'];
Map.addLayer(clippedData.select('LC_Type_1'), {palette: palette}, 'MODIS Land Cover 2020');
Step 4: Export the Land Cover Data
To export the land cover data as a GeoTIFF file, use the Export.image
function. Define the export parameters such as the region, scale, and format:
Export.image.toDrive({
image: clippedData.select('LC_Type_1').first(),
description: 'modis_landcover_export',
folder: 'GEE_Exports',
fileNamePrefix: 'modis_landcover_2020',
region: region,
scale: 500,
crs: 'EPSG:4326',
fileFormat: 'GeoTIFF',
maxPixels: 1e10
});
Key Notes
MODIS land cover data is updated periodically, and the dataset includes multiple land cover classes. Ensure your region and date filters match your analysis goals. Always review the dataset documentation for band details and classification definitions.
What MODIS Land Cover Dataset Is Available in Google Earth Engine?
The MODIS/006/MCD12Q1
dataset provides annual land cover classifications. It includes 17 land cover types (e.g., forest, agriculture, urban areas) and is available at 500m resolution.
How to Handle Cloud Cover in MODIS Data?
MODIS datasets typically do not include cloud cover information. If needed, combine the land cover data with cloud mask products or use GEE’s cloud cover filtering tools.
Can I Export the Data in Different Formats?
Yes, you can export as GeoTIFF, PNG, or other supported formats. Modify the fileFormat
parameter in the Export.image
function accordingly.
What Is the Best Way to Display MODIS Land Cover in GEE?
Use the Map.addLayer
method with the correct band (‘LC_Type_1’) and a color palette. Custom palettes improve interpretability and match your project requirements.
How Often Is the MODIS Land Cover Data Updated?
The MODIS Land Cover dataset is updated annually. Check the system:time_start
property for timestamps in the image collection.