Skip to content
Advertisement

Google Earth Engine multiple filters on date

Using Google Earth engine API, I can filter the start and end date of a satellite data. In this code for example, I can retrieve ASTER information between January 1st 2018 to July 15th 2018.

JavaScript

What I need to do, is to retrieve data between 2010 to 2020 but in summers only. Definitely, when I apply multiple ee.Filter.date filters, it returns nothing since summers of every year, doesn’t have overlaps. Is there any way to have multiple OR filters or somehow exclude the fall and winter from my retrieved data.

Advertisement

Answer

Here is my discoveries. In Google Earth Engine’s javascript api, you can find the following filter:

JavaScript

And fix the problem as

JavaScript

But in python api, it was not possible as I guess some functions were not implemented. So, one possible alternative is to use ee.filter.OR() to add a filter of multiple dates like:

JavaScript

and then apply it on ImageCollection() class:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement