0

I am new in Google Earth Engine. I used JRC image collection which is an image of global surface water from 1984-2019.

var gsw = ee.Image('JRC/GSW1_1/MonthlyHistory');

The problem is I cannot filter date from the image. I want to filter the date from 1994 to 2003.

Is it possible to filterDate from the image or filterDaate is only applicable for images collection?

1 Answer 1

3

The asset JRC/GSW1_1/MonthlyHistory is not an image, but an image collection, so you need to load it as one; then the filterDate operation will be available.

var gsw = ee.ImageCollection('JRC/GSW1_1/MonthlyHistory');
print(gsw.filterDate('1994-01-01', '2004-12-31'));

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.