Flood Mapping using Sentinel-1 SAR data in Google Earth Engine

  Рет қаралды 164

GIS Islam Mohamed

GIS Islam Mohamed

7 ай бұрын

الحصول على الكود
// Define the date ranges for pre-flood and post-flood analysis
var beforeStart = '2023-08-15';
var beforeEnd = '2023-09-13'; // End date of the pre-flood period (modifiable)
var afterStart = '2023-09-14'; // Start date of the post-flood period (modifiable)
var afterEnd = '2023-09-29'; // End date of the post-flood period (modifiable)
// Define the location of Derna using coordinates
var dernaPoint = ee.Geometry.Point([22.63204547765079,32.751539758574786]);
var bufferDistance = 10000; // Buffer distance in meters, can be adjusted
var geometry = dernaPoint.buffer(bufferDistance);
// Add the geometry to the map for visualization
Map.addLayer(geometry, {color: 'grey'}, 'Derna Area');
// Filter and select the SAR image collection for analysis
var collection = ee.ImageCollection('COPERNICUS/S1_GRD')
.filter(ee.Filter.eq('instrumentMode','IW'))
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VH'))
.filter(ee.Filter.listContains('transmitterReceiverPolarisation', 'VV'))
.filter(ee.Filter.eq('orbitProperties_pass', 'DESCENDING'))
.filter(ee.Filter.eq('resolution_meters',10))
.filter(ee.Filter.bounds(geometry))
.select(['VV', 'VH']);
// Filter the collection for the pre-flood and post-flood periods
var beforeCollection = collection
.filter(ee.Filter.date(beforeStart, beforeEnd));
var afterCollection = collection
.filter(ee.Filter.date(afterStart, afterEnd));
// Mosaic the images and clip them to the study area
var before = beforeCollection.mosaic().clip(geometry);
var after = afterCollection.mosaic().clip(geometry);
// Function to add a ratio band (VV/VH) to the images
var addRatioBand = function(image) {
var ratioBand = image.select('VV').divide(image.select('VH')).rename('VV/VH');
return image.addBands(ratioBand);
};
// Calculate the ratio bands for before and after images
var beforeRgb = addRatioBand(before);
var afterRgb = addRatioBand(after);
// Visualization parameters for the map
var visParams = {min:[-25, -25, 0] ,max:[0, 0, 2]};
// Center the map on the study area and add the layers for visualization
Map.centerObject(geometry, 10);
Map.addLayer(beforeRgb, visParams, 'Before Floods');
Map.addLayer(afterRgb, visParams, 'After Floods');
// Define a function to export an image to Google Drive
var exportImage = function(image, name) {
var exportOptions = {
scale: 10, // Adjust the scale as needed
region: geometry,
format: 'GeoTIFF', // Change the format if needed
fileFormat: 'GeoTIFF', // Change the file format if needed
maxPixels: 1e13 // Adjust as needed
};
Export.image.toDrive({
image: image,
description: name,
folder: 'YourFolderName', // Specify your Google Drive folder
fileNamePrefix: name,
crs: 'EPSG:4326',
crsTransform: [10, 0, 0, 0, -10, 0], // Adjust the CRS transform as needed
maxPixels: 1e13 // Adjust as needed
});
};
// Add a download button to export the "Before Floods" image
var downloadBeforeButton = ui.Button('Download Before Floods', function() {
exportImage(beforeRgb, 'Before_Floods');
});
downloadBeforeButton.style().set({position: 'top-right'});
Map.add(downloadBeforeButton);
// Add a download button to export the "After Floods" image
var downloadAfterButton = ui.Button('Download After Floods', function() {
exportImage(afterRgb, 'After_Floods');
});
downloadAfterButton.style().set({position: 'top-right'});
Map.add(downloadAfterButton);

Пікірлер: 1
@olaabdomohamedgad6343
@olaabdomohamedgad6343 7 ай бұрын
💪🩷💪👏❤
تحميل الأودية الجافة بشكل مباشر من GEE
5:46
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 29 МЛН
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 14 МЛН
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 193 МЛН
Climate Engine Download Maps
14:25
GIS Islam Mohamed
Рет қаралды 531
Webinar 7 - Flood Mapping with Sentinel 1 data
1:20:27
EO AFRICA R&D Facility
Рет қаралды 6 М.
كيفية الحصول على الخريطة الكنتورية و الطبوغرافية من برنامج قوقل ايرث برو google earth pro
13:16
قنـاة ســــــهــــــــل المــــعمــــــاريــــــة
Рет қаралды 4,1 М.
1.Field Maps العمل على
13:54
GIS Islam Mohamed
Рет қаралды 340
Google Earth Engine Tutorial-6: Flood Detection using Sentinel-1 Satellite
33:39
Google Earth Engine with Amirhossein Ahrari
Рет қаралды 4,3 М.
Designing a Dashboard and Integrating it with Field Maps
30:08
GIS Islam Mohamed
Рет қаралды 177
Imagery and Raster Data in ArcGIS - An Introduction
1:10:42
ArcGIS
Рет қаралды 10 М.
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 29 МЛН