I'm trying to calculate GPM v6 annual precipitation using the google earth engine. but show this error: Line 11: ee.ImageCollection(...).select(...).filterDate(...).filterBounds(...).clip is not a function

enter image description here

I'm using this code:


var ano_inicial = 2000
var ano_final = 2020
var mes = ee.List.sequence(1,12)
var intervalo = ee.List.sequence(ano_inicial,ano_final)
var inicio =  ee.Date.fromYMD(ano_inicial,1,1);
var fim = ee.Date.fromYMD(ano_final,12,31);

var GPM = ee.ImageCollection('NASA/GPM_L3/IMERG_V06')
var GPM_Anual = ee.ImageCollection.fromImages(
  intervalo.map(function (ano) {
    var annual = GPM.filter(ee.Filter.calendarRange(ano,ano,'year'))
    return annual

  image : GPM_Anual,
  description : 'GPM_annual_2000_2020',
  scale : 1000,
  region : geometry,
  maxPixels : 1e9

what is wrong?

  • Don't clip, you can only clip Images not Image Collections. Either map over the collection and clip everything or just leave it out if it's not completely necessary
    – JonasV
    Sep 10, 2021 at 11:15

1 Answer 1


clip is a function you can apply to images only, you are now trying to apply to the entire imageCollection. Instead you need to map over the entire collection (=select individual images) and clip it.

      return img.clip(geometry)



Your Answer

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

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