TransWikia.com

Google Earth Engine Modis Data Scaling

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

2 Answers

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

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'))
                    .filterBounds(COAHUILA)  
                    .select('NDVI').mean().multiply(0.0001)
                    .set('month', m);
}));

enter image description here

Answered by Chun Carolina on November 30, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP