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)

2 Answers 2


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())


You need to multiply by 0.0001.

var byMonth = ee.ImageCollection.fromImages(
      months.map(function(m) {
        return modis.filter(ee.Filter.calendarRange(m, m, 'month'))
                    .set('month', m);

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.