I want to clip all the images in a collection separately and export them. I am new to scripting.

//Map.addLayer(table, {color: 'FF0000'} , 'geometry');

var NDVICollection=ee.ImageCollection('MODIS/006/MOD13Q1')

var list = NDVICollection.toList(3);
    for (var i=1;i<4;i++){
         var nam=ee.String('NDVI_img')
var NDVIClipped = NDVICollection.clip(table);

var reprojected = NDVIClipped
    .unitScale(-2000, 10000)
    .reproject('EPSG:4326', null, 500);
//Map.addLayer(reprojected, {min: 0.0, max: 1}, 'Reprojected');
           image: reprojected,
           scale: 250,

I'm getting the error message:

NDVICollection.clip() is not a function.

  • Do you get an error message when you run your code or what?
    – BERA
    Jun 13, 2018 at 6:19
  • yes, its saying NDVICollection.clip() is not a function. Jun 13, 2018 at 6:42

1 Answer 1


You are trying to use an ee.Image function in an ee.ImageCollection object. You can map using .clip() trough images inside this collection as:

// create function to crop with table boundaries
var table_bounds = function(image) {
  // Crop by table extension
  return image.clip(table);

var NDVIClipped = NDVICollection.map(table_bounds);
  • 1
    That was really helpful, thanks!
    – Waleed93
    Jul 2, 2020 at 8:09

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.