Reduce over time

Get the min, max, mean, median or a percentile of your imagecollection.

Reducers can be applied to image collections. The example below reduces the imagecollection to a single image with the same number of bands. Each band contains the minimum value of all bands in the collection

Below an example with the code here.

// User specified parameters

// create the vizualization parameters
var viz = {min:0.0, max:3000, bands:"B4_min,B<span data-mce-type="bookmark" id="mce_SELREST_start" data-mce-style="overflow:hidden;line-height:0" style="overflow:hidden;line-height:0;">&#65279;</span>3_min,B2_min"};
var airport = ee.Geometry.Point([28.72151255607605,41.27191219799396]);

// Load and filter the Sentinel-2 image collection.
var collection = ee.ImageCollection('COPERNICUS/S2')
    .filterDate('2017-01-01', '2017-12-31')
    .filterBounds(airport);

// Function

// Reduce the collection.
var minToa = collection.reduce(ee.Reducer.min());

// add to map
Map.addLayer(minToa,viz,"Istanbul New Airport");
Map.centerObject(airport,13);

airport

Image taken by sentinel-2 of the construction site of Istanbul New Airport. The image contains the minimum value of the image collection of 2017. Using minimum values can be effective to remove clouds as clouds have high reflectance. The new airport is claimed to be the largest and busiest in the world when construction is finished.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s