Skip to main content

// You can simply use .and.and()

//For For example

var nvdi = (NIR.subtract(red)).divide(NIR.add(red)).rename('NDVI');

var filtered = nvdi.lt(0.75).and(nvdi.gt(0.35)); // to get between say 0.35 and 0.75

Map.addLayer(filtered,{min: -1, max: 1},'ndvi_rice_1'); // plot

var nvdi = (NIR.subtract(red)).divide(NIR.add(red)).rename('NDVI');

var filtered = nvdi.lt(0.75).and(nvdi.gt(0.35));  // to get between say 0.35 and 0.75 

Map.addLayer(filtered,{min: -1, max: 1},'ndvi_rice_1'); // plot`

// You can simply use .and

//For example

var nvdi = (NIR.subtract(red)).divide(NIR.add(red)).rename('NDVI');

var filtered = nvdi.lt(0.75).and(nvdi.gt(0.35)); // to get between say 0.35 and 0.75

Map.addLayer(filtered,{min: -1, max: 1},'ndvi_rice_1'); // plot

You can simply use .and()

For example

var nvdi = (NIR.subtract(red)).divide(NIR.add(red)).rename('NDVI');

var filtered = nvdi.lt(0.75).and(nvdi.gt(0.35));  // to get between say 0.35 and 0.75 

Map.addLayer(filtered,{min: -1, max: 1},'ndvi_rice_1'); // plot`
Source Link

// You can simply use .and

//For example

var nvdi = (NIR.subtract(red)).divide(NIR.add(red)).rename('NDVI');

var filtered = nvdi.lt(0.75).and(nvdi.gt(0.35)); // to get between say 0.35 and 0.75

Map.addLayer(filtered,{min: -1, max: 1},'ndvi_rice_1'); // plot