Hello!
I have shape and I want to get the two last available NDVI images for them and run calculation on these two images, to get in the end 1 image.
For that I have used the “orbit” mosaic,
as following:
VERSION=3
function setup() {
return {
input: u"B04", "B08", "CLM"],
output: {
bands: 1,
mosaicking: "ORBIT"
sampleType: "FLOAT32"
}
};
}
function evaluatePixel(sample) {
if (sample.CLM == 1) {
return unull]
}
let date1=index(samplem0].B08, samplem0].B04);
let date2=index(samplem1].B08, samplem1].B04);
let difference=index(date1,date2)
return udifference];
}
'''
My questions are:
- I use date range (‘2022-05-31’,‘2022-06-16’). How do I know which dates are taken? I know that there are three images between these two dates.
- which date is earlier? the samples 0] or samples]1]?
thanks