Skip to main content
syntax highlight
Source Link
Rodrigo E. Principe
  • 10.2k
  • 1
  • 31
  • 37

I've wrote this code but it makes error about min and max image?

var modis = ee.ImageCollection("MODIS/006/MOD13Q1")
.filterBounds(geometry)
.filterDate("2000-01-01","2001-01-01")
.select("NDVI");

print(modis);

var mod13 = modis.map(function(img){
  return img.multiply(0.0001)
  .copyProperties(img,['system:time_start','system:time_end']);
});

print(mod13);

var vci = mod13.map(function(img){
 var id = img.id();
 var min =  img.reduceRegion(ee.Reducer.min(),geometry,250);
 var max = img.reduceRegion(ee.Reducer.max(),geometry,250);
 return img.expression(
   "(NDVI-min)/(max-min)",{
     "NDVI" : img,
     "max" : max,
     "min" : min
   }).copyProperties(img,['system:time_start','system:time_end']);
});
var modis = ee.ImageCollection("MODIS/006/MOD13Q1")
.filterBounds(geometry)
.filterDate("2000-01-01","2001-01-01")
.select("NDVI");

print(modis);

var mod13 = modis.map(function(img){
  return img.multiply(0.0001)
  .copyProperties(img,['system:time_start','system:time_end']);
});

print(mod13);

var vci = mod13.map(function(img){
 var id = img.id();
 var min =  img.reduceRegion(ee.Reducer.min(),geometry,250);
 var max = img.reduceRegion(ee.Reducer.max(),geometry,250);
 return img.expression(
   "(NDVI-min)/(max-min)",{
     "NDVI" : img,
     "max" : max,
     "min" : min
   }).copyProperties(img,['system:time_start','system:time_end']);
});

I've wrote this code but it makes error about min and max image?

var modis = ee.ImageCollection("MODIS/006/MOD13Q1")
.filterBounds(geometry)
.filterDate("2000-01-01","2001-01-01")
.select("NDVI");

print(modis);

var mod13 = modis.map(function(img){
  return img.multiply(0.0001)
  .copyProperties(img,['system:time_start','system:time_end']);
});

print(mod13);

var vci = mod13.map(function(img){
 var id = img.id();
 var min =  img.reduceRegion(ee.Reducer.min(),geometry,250);
 var max = img.reduceRegion(ee.Reducer.max(),geometry,250);
 return img.expression(
   "(NDVI-min)/(max-min)",{
     "NDVI" : img,
     "max" : max,
     "min" : min
   }).copyProperties(img,['system:time_start','system:time_end']);
});

I've wrote this code but it makes error about min and max image?

var modis = ee.ImageCollection("MODIS/006/MOD13Q1")
.filterBounds(geometry)
.filterDate("2000-01-01","2001-01-01")
.select("NDVI");

print(modis);

var mod13 = modis.map(function(img){
  return img.multiply(0.0001)
  .copyProperties(img,['system:time_start','system:time_end']);
});

print(mod13);

var vci = mod13.map(function(img){
 var id = img.id();
 var min =  img.reduceRegion(ee.Reducer.min(),geometry,250);
 var max = img.reduceRegion(ee.Reducer.max(),geometry,250);
 return img.expression(
   "(NDVI-min)/(max-min)",{
     "NDVI" : img,
     "max" : max,
     "min" : min
   }).copyProperties(img,['system:time_start','system:time_end']);
});
Source Link

Image Collection minimum and maximum Extraction in Google Earth Engine?

I've wrote this code but it makes error about min and max image?

var modis = ee.ImageCollection("MODIS/006/MOD13Q1")
.filterBounds(geometry)
.filterDate("2000-01-01","2001-01-01")
.select("NDVI");

print(modis);

var mod13 = modis.map(function(img){
  return img.multiply(0.0001)
  .copyProperties(img,['system:time_start','system:time_end']);
});

print(mod13);

var vci = mod13.map(function(img){
 var id = img.id();
 var min =  img.reduceRegion(ee.Reducer.min(),geometry,250);
 var max = img.reduceRegion(ee.Reducer.max(),geometry,250);
 return img.expression(
   "(NDVI-min)/(max-min)",{
     "NDVI" : img,
     "max" : max,
     "min" : min
   }).copyProperties(img,['system:time_start','system:time_end']);
});