Google Earth Engine Tutorial: Detect Marine Oil Spills with Sentinel-1
Credit: Youtube Channel “Terra Spatial, Learn how to detect marine oil spills using Sentinel-1 VV backscatter imagery for environmental monitoring.”
You can see all the tutorials from here: Techgeo Academy.
Introduction to Marine Oil Spill Detection with Google Earth Engine and Sentinel-1
Marine oil spills are environmental hazards that require quick identification and monitoring. Google Earth Engine (GEE) provides powerful tools for accessing and analyzing satellite data, with Sentinel-1 being particularly useful for oil spill detection due to its synthetic aperture radar (SAR) capabilities. This tutorial outlines the process of leveraging Sentinel-1 data within GEE to detect oil spills in marine areas.
Step 1: Load and Filter Sentinel-1 Data
First, load the Sentinel-1 dataset and filter it by date, location, and polarization. Here’s an example code snippet:
var s1 = ee.ImageCollection('COPERNICUS/S1_GRD')
.filter(ee.Filter.eq('instrumentMode', 'IW'))
.filter(ee.Filter.eq('transmitterReceiverPolarisation', 'VV VH'))
.filterDate('2023-01-01', '2023-01-31')
.filterBounds(ee.Geometry.Rectangle([lon_min, lat_min, lon_max, lat_max]));This filters GEE’s Sentinel-1 dataset for Interferometric Wide (IW) mode images with vertical and horizontal polarization, within a defined time frame and geographic area.
Step 2: Preprocess the Data
Preprocessing includes converting the data to a consistent scale and applying masks for clouds or invalid pixels. Example code:
var preprocessed = s1.map(function(image) {
return image.select(['VV', 'VH'])
.multiply(1000)
.rename('backscatter_VV', 'backscatter_VH')
.updateMask(image.select('VH').gt(0));
});This enhances the backscatter values and applies a mask to exclude non-usable data.
Step 3: Analyze Polarization for Oil Spills
Oil spills on water reduce the surface roughness, causing lower backscatter in HH polarization and higher in VV under certain conditions. Use the polarization bands to isolate these anomalies:
var oilSpillFeatures = preprocessed.map(function(image) {
var oilMask = image.select('VV').lt(7).and(image.select('VH').gt(12);
return image.updateMask(oilMask).rename('oil_mask');
});This creates a mask by identifying areas with low VV and high VH values, which are typical of oil slicks.
Step 4: Process and Visualize Results
Combine images temporally and apply additional analysis to refine the oil spill detection:
var oilSpill = oilSpillFeatures.mean();
Map.addLayer(oilSpill, {min: 0, max: 1, palette: ['red']}, 'Oil Spill Detection');Visualization helps identify potential spill areas. Adjust thresholds and parameters iteratively for accuracy.
FAQ
- Q: What bands should I use for oil spill detection in Sentinel-1? A: Typically, the VV and VH polarization bands are used, as oil spills alter their backscatter characteristics.
- Q: Is Sentinel-1 safe for oil spill detection? A: Sentinel-1’s SAR data is highly reliable for oil spill monitoring, as it can penetrate clouds and operate day or night.
- Q: How long does processing take in Google Earth Engine? A: Processing time depends on data size and complexity. Use GEE’s built-in tools like
MapandExportto optimize performance. - Q: Can this method detect small oil spills? A: Yes, but precision may vary. Additional data sources (e.g., optical imagery) or machine learning can improve accuracy.
- Q: Are there pre-built scripts for this task? A: Yes, GEE’s code editor has libraries and examples. Explore the GEE documentation for templates.
Conclusion
Using Sentinel-1 data in Google Earth Engine allows efficient detection of marine oil spills by analyzing radar backscatter and polarization. Combine these techniques with domain knowledge and additional datasets for robust results. For deeper exploration, try the provided code in the GEE JavaScript editor or convert it to Python for automation.






