Skip to main content
Not relevant ot geemap
Link
Justin Braaten
  • 6.2k
  • 1
  • 21
  • 43
code formatting
Source Link
Kevin Reid
  • 10.5k
  • 16
  • 19

I am trying to download time series ET. But the batch tool is not working. Error: "In users/fitoprincipe/geetools:batch Line 133: collection.size is not a function" ''' var batch = require('users/fitoprincipe/geetools:batch'); var extent = ee.FeatureCollection("users/waqas50125012/KPK"); var StartDate = '2010-01-01'; var EndDate = '2010-12-31'; var dataset = ee.ImageCollection('MODIS/006/MOD16A2').select('ET').filterDate(StartDate,EndDate); function clp(img) { return img.clip(extent); }

var clip = dataset.map(clp); var ET = clip.select('ET'); Map.centerObject(extent); var evapotranspirationVis = { min: 0.0, max: 300.0, palette: [ 'ffffff', 'fcd163', '99b718', '66a000', '3e8601', '207401', '056201', '004c00', '011301' ], }; Map.addLayer(ET, evapotranspirationVis, 'ET'); Map.addLayer(extent); batch.Download.ImageCollection.toDrive({ image: ET.select('ET'), description: 'ET', scale: 30, region: extent, maxPixels: 1e13, }); var plotET = ui.Chart.image.series(ET.select('ET'), extent) .setOptions({ title: 'ET short-term time series', hAxis: {title: 'Date'}, vAxis: {title: 'ET'} });

In users/fitoprincipe/geetools:batch
Line 133: collection.size is not a function

// Display. print(plotET); '''

var batch = require('users/fitoprincipe/geetools:batch');
var extent = ee.FeatureCollection("users/waqas50125012/KPK");
var StartDate = '2010-01-01';
var EndDate = '2010-12-31';
var dataset = ee.ImageCollection('MODIS/006/MOD16A2').select('ET').filterDate(StartDate,EndDate);
function clp(img) {
  return img.clip(extent);
}

var clip = dataset.map(clp);
var ET = clip.select('ET');
Map.centerObject(extent);
var evapotranspirationVis = {
  min: 0.0,
  max: 300.0,
  palette: [
    'ffffff', 'fcd163', '99b718', '66a000', '3e8601', '207401', '056201',
    '004c00', '011301'
  ],
};
Map.addLayer(ET, evapotranspirationVis, 'ET');
Map.addLayer(extent);
batch.Download.ImageCollection.toDrive({
  image: ET.select('ET'),
  description: 'ET',
  scale: 30,
  region: extent,
  maxPixels: 1e13,
});
var plotET = ui.Chart.image.series(ET.select('ET'), extent)
            .setOptions({
                title: 'ET short-term time series',
                hAxis: {title: 'Date'},
                vAxis: {title: 'ET'}
});

// Display.
print(plotET);

I am trying to download time series ET. But the batch tool is not working. Error: "In users/fitoprincipe/geetools:batch Line 133: collection.size is not a function" ''' var batch = require('users/fitoprincipe/geetools:batch'); var extent = ee.FeatureCollection("users/waqas50125012/KPK"); var StartDate = '2010-01-01'; var EndDate = '2010-12-31'; var dataset = ee.ImageCollection('MODIS/006/MOD16A2').select('ET').filterDate(StartDate,EndDate); function clp(img) { return img.clip(extent); }

var clip = dataset.map(clp); var ET = clip.select('ET'); Map.centerObject(extent); var evapotranspirationVis = { min: 0.0, max: 300.0, palette: [ 'ffffff', 'fcd163', '99b718', '66a000', '3e8601', '207401', '056201', '004c00', '011301' ], }; Map.addLayer(ET, evapotranspirationVis, 'ET'); Map.addLayer(extent); batch.Download.ImageCollection.toDrive({ image: ET.select('ET'), description: 'ET', scale: 30, region: extent, maxPixels: 1e13, }); var plotET = ui.Chart.image.series(ET.select('ET'), extent) .setOptions({ title: 'ET short-term time series', hAxis: {title: 'Date'}, vAxis: {title: 'ET'} });

// Display. print(plotET); '''

I am trying to download time series ET. But the batch tool is not working. Error:

In users/fitoprincipe/geetools:batch
Line 133: collection.size is not a function
var batch = require('users/fitoprincipe/geetools:batch');
var extent = ee.FeatureCollection("users/waqas50125012/KPK");
var StartDate = '2010-01-01';
var EndDate = '2010-12-31';
var dataset = ee.ImageCollection('MODIS/006/MOD16A2').select('ET').filterDate(StartDate,EndDate);
function clp(img) {
  return img.clip(extent);
}

var clip = dataset.map(clp);
var ET = clip.select('ET');
Map.centerObject(extent);
var evapotranspirationVis = {
  min: 0.0,
  max: 300.0,
  palette: [
    'ffffff', 'fcd163', '99b718', '66a000', '3e8601', '207401', '056201',
    '004c00', '011301'
  ],
};
Map.addLayer(ET, evapotranspirationVis, 'ET');
Map.addLayer(extent);
batch.Download.ImageCollection.toDrive({
  image: ET.select('ET'),
  description: 'ET',
  scale: 30,
  region: extent,
  maxPixels: 1e13,
});
var plotET = ui.Chart.image.series(ET.select('ET'), extent)
            .setOptions({
                title: 'ET short-term time series',
                hAxis: {title: 'Date'},
                vAxis: {title: 'ET'}
});

// Display.
print(plotET);
Source Link

Trying to export entire image collection but batch is not working?

I am trying to download time series ET. But the batch tool is not working. Error: "In users/fitoprincipe/geetools:batch Line 133: collection.size is not a function" ''' var batch = require('users/fitoprincipe/geetools:batch'); var extent = ee.FeatureCollection("users/waqas50125012/KPK"); var StartDate = '2010-01-01'; var EndDate = '2010-12-31'; var dataset = ee.ImageCollection('MODIS/006/MOD16A2').select('ET').filterDate(StartDate,EndDate); function clp(img) { return img.clip(extent); }

var clip = dataset.map(clp); var ET = clip.select('ET'); Map.centerObject(extent); var evapotranspirationVis = { min: 0.0, max: 300.0, palette: [ 'ffffff', 'fcd163', '99b718', '66a000', '3e8601', '207401', '056201', '004c00', '011301' ], }; Map.addLayer(ET, evapotranspirationVis, 'ET'); Map.addLayer(extent); batch.Download.ImageCollection.toDrive({ image: ET.select('ET'), description: 'ET', scale: 30, region: extent, maxPixels: 1e13, }); var plotET = ui.Chart.image.series(ET.select('ET'), extent) .setOptions({ title: 'ET short-term time series', hAxis: {title: 'Date'}, vAxis: {title: 'ET'} });

// Display. print(plotET); '''