Google Earth Engine Tutorial: Detect Los Angeles Wildfires
Credit: Youtube Channel “Terra Spatial, Case study on wildfire detection in Los Angeles using VIIRS and Landsat 9 data.”
You can see all the tutorials from here: Techgeo Academy.
Google Earth Engine Tutorial: Detect Los Angeles Wildfires
Google Earth Engine (GEE) is a powerful platform for analyzing geospatial data, making it ideal for monitoring wildfires. This tutorial guides you through the process of detecting wildfires in Los Angeles using satellite imagery and GEE’s tools.
Step 1: Access Google Earth Engine
Create a Google account and access the GEE Code Editor at https://code.earthengine.google.com. This environment allows you to run geospatial analyses without installing software.
Step 2: Load Wildfire Data
GEE offers datasets like MODIS/006/MOD14A1 (active fire data) and USGS Landsat for burn scar detection. Use the following code to load and filter data:
var modisFire = ee.ImageCollection('MODIS/006/MOD14A1')
.filterDate('2023-01-01', '2023-12-31')
.filter(ee.Filter.geometry(ee.Geometry.Rectangle([-118.41, 33.82, -117.92, 34.30])));
var landsat = ee.ImageCollection('LANDSAT/LC08/C02/T1_L2')
.filterDate('2023-01-01', '2023-12-31')
.filter(ee.Filter.geometry(ee.Geometry.Rectangle([-118.41, 33.82, -117.92, 34.30])));Step 3: Analyze Active Fires
Use the MODIS/006/MOD14A1 dataset to detect active fires. Highlight the fire pixels using a threshold on the fireMask band:
var activeFires = modisFire.select('fireMask');
Map.setCenter(-118.25, 34.05, 8);
Map.addLayer(activeFires, {palette: 'red'}, 'Active Fires');Step 4: Visualize Burned Areas
Landsat imagery can identify burn scars by analyzing spectral indices like the Normalized Burn Ratio (NBR). Create a composite of pre- and post-fire images to compare changes:
var preFire = landsat.filterDate('2023-01-01', '2023-03-31').select(['SR_B.4', 'SR_B.5', 'SR_B.6']);
var postFire = landsat.filterDate('2023-06-01', '2023-09-30').select(['SR_B.4', 'SR_B.5', 'SR_B.6']);
var burnScars = preFire.map(function(img) {
return img.select(['SR_B.4', 'SR_B.5', 'SR_B.6']).rename(['Red', 'Green', 'Blue'])
.eeImage(right, 1, 1, 1);
});
Map.addLayer(burnScars, {bands: ['Red', 'Green', 'Blue'], min: 0, max: 3000}, 'Burned Areas');Step 5: Export Results
Export the detected fire areas as a GeoTIFF or CSV using GEE’s export functions. For example:
Export.image.toDrive({
image: activeFires,
description: 'LA_Wildfires',
fileNamePrefix: 'la_wildfire_detection',
region: ee.Geometry.Rectangle([-118.41, 33.82, -117.92, 34.30]),
crs: 'EPSG:4326',
scale: 1000
});FAQ
What data sources are best for wildfire detection in GEE?
Use MODIS active fire products for real-time detection and Landsat for detailed burn scar analysis. Both datasets provide critical insights into fire presence and impact.
How accurate is wildfire detection in GEE?
Accuracy depends on data resolution and sensor sensitivity. MODIS offers global coverage but lower resolution, while Landsat provides higher detail but limited temporal coverage. Cross-referencing multiple datasets improves results.
Is there a cost to use GEE for wildfire analysis?
GEE is free for users with a Google account. However, processing large datasets or exporting high-resolution data may require optimizing scripts to avoid resource limits.
What skills are needed for this tutorial?
Familiarity with JavaScript (GEE’s primary language) and basic GIS concepts is essential. No prior experience with GEE is required, but understanding satellite imagery and indices like NBR helps.
Can I detect wildfires in real-time with GEE?
Yes, GEE supports real-time analysis using datasets like MODIS. However, results depend on data latency, which varies by satellite source.
How long does processing take for wildfire detection?
Processing time varies based on dataset size and computational complexity. Simple queries run quickly, while large-area analyses may take minutes. Use the “Code Editor” to monitor execution.







