Three height

Map canopy cover for the period 2000 – 2017

step 1: add a geometry to the map

step 2: add the area of interest

// set the area of interest
var chl = ee.FeatureCollection("users/servirmekong/Vietnam/CHL_Boundary").geometry();

step 3: import the tree canopy cover image collection

// import tree canopy cover
var th = ee.ImageCollection("projects/servir-mekong/yearly_primitives_smoothed/tree_height");

step 4: set period of interest

// set year of interest
var year = 2017;
var startDate = ee.Date.fromYMD(year,1,1);
var endDate = ee.Date.fromYMD(year,12,31);

step 5: filter for date to get the image

// get image for the year
var thImage = ee.Image(th.filterDate(startDate,endDate).first());;

step 6: add the image to the map

Map.addLayer(thImage.clip(chl),{min:0,max:40,palette:"white,lightgreen,green,darkgreen"});

step 7: add a chart to get the timeseries.

print(ui.Chart.image.series(th, geometry, ee.Reducer.mean(), 30, 'system:time_start')
.setSeriesNames(['cc'])
.setOptions({
title: 'Canopy cover',
lineWidth: 1,
pointSize: 3,
}));

Find the example here

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