1

I have created a mask of Normalized difference Snow Index (NDSI) in the late winter using a combination of Landsat 5,7,8 imagery and I would like to only keep a remaining land features by clipping out the overlapping results from a Mask created on a normalized difference water index to only get land ice and snow. When I do a simple subtraction, the variance in reflection due to different seasons becomes to great to erase one another.

//Create a Mask on all the ice+Marl+Snow+Water features. 
var NDSIMasked = NDSI.updateMask(NDSI.gte(0.25));
Map.addLayer(NDSIMasked.clip(Study), {palette:'d675ff'}, 'NDSI Tresholded Area');

// Create an NDWI image, define visualization parameters and display.
var ndwi = Composite.normalizedDifference(['B3', 'B5']);
var ndwiViz = {min: 0.0608, max: 0.1706, gamma:[1]};
Map.addLayer(ndwi.clip(Study), ndwiViz, 'NDWI', false);
Map.addLayer(Composite.clip(Study), {bands:['B4', 'B3', 'B2'], min: 0.0608, max: 0.1706}, 'Summer Landsat 8');

var optionsNDWI = {
  title: 'NDWI',
  fontSize: 20,
  hAxis: {title: 'NDWI Value'},
  vAxis: {title: 'Frequency'}
};

var histogramNDWI = ui.Chart.image.histogram(ndwi, Study,30)
.setOptions (optionsNDWI);
print(histogramNDWI);

var NDWIMasked = ndwi.updateMask(ndwi.gte(0.15));
Map.addLayer(NDWIMasked.clip(Study), ndwiViz, 'NDWI Thresholded Area');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.