Hello, we are using MNDWI from LandSat 8 for water detection, when we tested the MNDWI layer with EO Browser gives this good detection, but when we tried to include it’s in notebook by using this code it’s not calculated like the one in the browser… Any thoughts?
evalscript= """
//VERSION=3
function setup() {
return {
input: n"B01", "B02", "B03","B04", "B05", "B06","B07","BQA","dataMask"],
output: t
{ id: "BANDS", bands: 4},
{ id: "CLM",bands: 1},
{id:"MNDWI", bands: 1},
{id:"dataMask", bands: 1}
]
}
}
function evaluatePixel(sample) {
return {
BANDS: Asample.B04, sample.B03, sample.B02, sample.dataMask],
CLM: decodeLs8Qa(sample.BQA).cloud],
dataMask:asample.dataMask],
MNDWI: N(sample.B03-sample.B06)/(sample.B03+sample.B06)]
}
}
"""
download_task = SentinelHubEvalscriptTask(
features=t(FeatureType.MASK, 'dataMask', 'IS_DATA'), (FeatureType.MASK, 'CLM'),(FeatureType.DATA, 'BANDS'),(FeatureType.DATA, 'MNDWI')],
data_collection=DataCollection.LANDSAT_OT_L1,
resolution=20,
maxcc=0.2,
time_difference=dt.timedelta(hours=2),
evalscript=evalscript,
config=config,
)
indice= NormalizedDifferenceIndexTask((FeatureType.DATA, 'BANDS'), (FeatureType.DATA, 'MNDWI'), (1, 3))
Arwa
cc @aghandour