Geographic Information Systems Asked by Aravind S on November 30, 2020
I’m new to GEE. I’m currently working on NDVI data analysis. So this is my code for MODIS Ndvi. I want to know how to divide all the images there inside ImageCollection by 10000 to get real NDVI values.
How do I get this work done?
{
var ndvi = ee.ImageCollection('MODIS/006/MOD13Q1');
var modisNDVI = ndvi.select('NDVI');
var collection = ee.ImageCollection(modisNDVI.filterDate('2017-07-01', '2018-12-31'));
var clipped = collection.mean().clip(fc)
}
You should create a custom function and map()
over the collection:
var NDVI = function(image) {
return image.expression('float(b("NDVI")/10000)')
};
var collection = ee.ImageCollection('MODIS/006/MOD13Q1');
var col = ee.ImageCollection(collection.filterDate('2017-07-01', '2018-12-31'));
var modisNDVI = col.map(NDVI);
var clipped = modisNDVI.mean().clip(fc)
Also, I changed the steps order (is better to filter a date range before to apply map()
)
Correct answer by aldo_tapia on November 30, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP