Forest Density Classification by using Google Earth Engine

  Рет қаралды 210

TECH HIVE

TECH HIVE

Күн бұрын

Пікірлер: 10
@NamgayNamgay-t1g
@NamgayNamgay-t1g 22 сағат бұрын
great video thanks.. Also make a video on forest fire risk assessment using forest type, slope, aspect, precipitation and land surface temperature as factors.
@IAKhan-km4ph
@IAKhan-km4ph 4 ай бұрын
Very nice
@techhive.2023
@techhive.2023 4 ай бұрын
Thanks
@Ramilacookware
@Ramilacookware Ай бұрын
You can get time seris forest for each year❤❤❤❤❤😂🎉🎉🎉
@techhive.2023
@techhive.2023 Ай бұрын
yes you can get it with sentinental image
@vineesh.geography
@vineesh.geography 3 ай бұрын
Good work. Please share the script. Thanks in advance
@techhive.2023
@techhive.2023 3 ай бұрын
// Define your area of interest var geometry = ee.Geometry.Rectangle([77.28, 8.314, 77.906, 11.689]); // Replace with your region // Load the Sentinel-2 Image Collection, filter by date and region var image = ee.ImageCollection('COPERNICUS/S2') .filterDate('2023-01-01', '2023-12-31') .filterBounds(geometry) .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 10)) .median() .clip(geometry); // Calculate NDVI var ndvi = image.normalizedDifference(['B8', 'B4']).rename('NDVI'); // Define thresholds for forest density classification var denseForest = ndvi.gte(0.6).rename('Dense Forest'); var moderateForest = ndvi.gte(0.4).and(ndvi.lt(0.6)).rename('Moderate Forest'); var sparseForest = ndvi.gte(0.2).and(ndvi.lt(0.4)).rename('Sparse Forest'); var nonForest = ndvi.lt(0.2).rename('Non-Forest'); // Create a classified image var classified = denseForest.add(moderateForest).add(sparseForest).add(nonForest); // Define visualization parameters var denseForestVis = {palette: ['006400'], opacity: 0.6}; // Dark green var moderateForestVis = {palette: ['32CD32'], opacity: 0.6}; // Lime green var sparseForestVis = {palette: ['ADFF2F'], opacity: 0.6}; // Light green var nonForestVis = {palette: ['FFD700'], opacity: 0.6}; // Yellow // Add layers to the map Map.centerObject(geometry, 10); Map.addLayer(denseForest.updateMask(denseForest), denseForestVis, 'Dense Forest'); Map.addLayer(moderateForest.updateMask(moderateForest), moderateForestVis, 'Moderate Forest'); Map.addLayer(sparseForest.updateMask(sparseForest), sparseForestVis, 'Sparse Forest'); Map.addLayer(nonForest.updateMask(nonForest), nonForestVis, 'Non-Forest'); // Add a legend var legend = ui.Panel({ style: { position: 'bottom-left', padding: '8px 15px' } }); var legendTitle = ui.Label({ value: 'Forest Density Legend', style: { fontWeight: 'bold', fontSize: '18px', margin: '0 0 4px 0', padding: '0' } }); legend.add(legendTitle); var makeRow = function(color, name) { var colorBox = ui.Label({ style: { backgroundColor: color, padding: '8px', margin: '0 0 4px 0' } }); var description = ui.Label({ value: name, style: {margin: '0 0 4px 6px'} }); return ui.Panel({ widgets: [colorBox, description], layout: ui.Panel.Layout.Flow('horizontal') }); }; var palette = ['006400', '32CD32', 'ADFF2F', 'FFD700']; var names = ['Dense Forest', 'Moderate Forest', 'Sparse Forest', 'Non-Forest']; for (var i = 0; i < palette.length; i++) { legend.add(makeRow(palette[i], names[i])); } Map.add(legend);
@luqmanatiquegondal2925
@luqmanatiquegondal2925 4 ай бұрын
Where is the code ? Thanks
@techhive.2023
@techhive.2023 4 ай бұрын
// Define your area of interest var geometry = ee.Geometry.Rectangle([77.28, 8.314, 77.906, 11.689]); // Replace with your region // Load the Sentinel-2 Image Collection, filter by date and region var image = ee.ImageCollection('COPERNICUS/S2') .filterDate('2023-01-01', '2023-12-31') .filterBounds(geometry) .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 10)) .median() .clip(geometry); // Calculate NDVI var ndvi = image.normalizedDifference(['B8', 'B4']).rename('NDVI'); // Define thresholds for forest density classification var denseForest = ndvi.gte(0.6).rename('Dense Forest'); var moderateForest = ndvi.gte(0.4).and(ndvi.lt(0.6)).rename('Moderate Forest'); var sparseForest = ndvi.gte(0.2).and(ndvi.lt(0.4)).rename('Sparse Forest'); var nonForest = ndvi.lt(0.2).rename('Non-Forest'); // Create a classified image var classified = denseForest.add(moderateForest).add(sparseForest).add(nonForest); // Define visualization parameters var denseForestVis = {palette: ['006400'], opacity: 0.6}; // Dark green var moderateForestVis = {palette: ['32CD32'], opacity: 0.6}; // Lime green var sparseForestVis = {palette: ['ADFF2F'], opacity: 0.6}; // Light green var nonForestVis = {palette: ['FFD700'], opacity: 0.6}; // Yellow // Add layers to the map Map.centerObject(geometry, 10); Map.addLayer(denseForest.updateMask(denseForest), denseForestVis, 'Dense Forest'); Map.addLayer(moderateForest.updateMask(moderateForest), moderateForestVis, 'Moderate Forest'); Map.addLayer(sparseForest.updateMask(sparseForest), sparseForestVis, 'Sparse Forest'); Map.addLayer(nonForest.updateMask(nonForest), nonForestVis, 'Non-Forest'); // Add a legend var legend = ui.Panel({ style: { position: 'bottom-left', padding: '8px 15px' } }); var legendTitle = ui.Label({ value: 'Forest Density Legend', style: { fontWeight: 'bold', fontSize: '18px', margin: '0 0 4px 0', padding: '0' } }); legend.add(legendTitle); var makeRow = function(color, name) { var colorBox = ui.Label({ style: { backgroundColor: color, padding: '8px', margin: '0 0 4px 0' } }); var description = ui.Label({ value: name, style: {margin: '0 0 4px 6px'} }); return ui.Panel({ widgets: [colorBox, description], layout: ui.Panel.Layout.Flow('horizontal') }); }; var palette = ['006400', '32CD32', 'ADFF2F', 'FFD700']; var names = ['Dense Forest', 'Moderate Forest', 'Sparse Forest', 'Non-Forest']; for (var i = 0; i < palette.length; i++) { legend.add(makeRow(palette[i], names[i])); } Map.add(legend);
@luqmanatiquegondal2925
@luqmanatiquegondal2925 4 ай бұрын
@@techhive.2023 Thanks
Google Earth Engine app for forest loss alerts using SAR data
20:32
University of Redlands Center for Spatial Studies
Рет қаралды 191
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
How might LLMs store facts | DL7
22:43
3Blue1Brown
Рет қаралды 920 М.
Modeling Forest Canopy Height using EO Data and GEE
14:31
Courage Kamusoko
Рет қаралды 4,1 М.
Modeling AGBD GEDI L4B EarthEngine2
13:38
Courage Kamusoko
Рет қаралды 5 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН