Hello there
We are using Eos explorer we are getting the NDVI for all area, we are looking to calculate those values based on the area of interest, the idea is to calculate the green area inside this area of interest
is there any way we could get this direct from the platform, or do we have to do it outside the platform
Thanks
I assume you are using EO Browser? To get the statistics you need, you should first modify your evalscript so that you get a binary classification. For example by saying that all NDVI values larger than 0.6 should be identified as vegetation. You can pick this threshold at any level you think is sensible.
The evalscript could look like this:
//VERSION=3
const threshold = 0.6
function evaluatePixel(samples) {
let val = index(samples.B08, samples.B04);
return [val>threshold];
}
function setup() {
return {
input: [{
bands: [
"B04",
"B08",
"dataMask"
]
}],
output: {
bands: 1
}
}
}
Then in EO Browser, specify your area of interest and then in the same toolbox hit the Statistical Info Button (The one that looks like a bar chart):
This will give you the mean of all values in your area of interest which with the binary classification is the same as the proportion of vegetation in your AOI.
Hope that helps!
Hello
thanks for your response I follow up on the steps just to make sure I got it right
These is the results
the is total area is 100ha the green area is 100*0.001839926 = 0.18 ha is this right
Thanks
Yes the theory is correct. Your AOI would be 0.18% covered in green area.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.