Creating Monthly NDVI Composites (Sentinel-2) on Google Earth Engine
This post presents a process for the creation of monthly NDVI composites with Sentinel-2 data on the Google Earth Engine (GEE) platform. The process consists of 3 parts: i) acquisition and pre-processing of a time-series of Sentinel-2 images; ii) creation of monthly composites and iii) gap filling using historic data.
Part 1 — Sentinel-2 time-series acquisition and pre-processing
This part comprises three main steps: image collection importing, cloud filtering and NDVI computation.
We start by defining our study area and the dates of start and end of our time-series. In this example, we’ll be interested in generating monthly composites for the calendar year of 2020.
Note that, because we’ll need historic data to perform gap filling (discussed in Part 3), the starting date used in the filterDate
needs to be set to 1 year earlier.
//PART 1.1 - Create time series (Image Collection)
//define study area and dates
var study_area = ee.Geometry.Rectangle([
[-8.757320, 39.854857],
[-8.427730, 40.050665]]);
var date_start = ee.Date('2020-01-01');
var date_end= ee.Date('2020-12-31');
//center Map
var long = ee.Number(study_area.centroid()
.coordinates().get(0)).getInfo();
var lat = ee.Number(study_area.centroid()
.coordinates().get(1)).getInfo();
Map.setCenter(long,lat,11);
//define collection
var S2 =…