Mapping forest rotations

Count the number of disturbances

Use the code below or click here

// Load Study Area
var mekongBuffer = ee.FeatureCollection('ft:1LEGeqwlBCAlN61ie5ol24NdUDqB1MgpFR_sJNWQJ');
var mekongRegion = mekongBuffer.geometry(); // Buffered region

// import tree canopy cover and tree canopy height
var tccCollection = ee.ImageCollection("projects/servir-mekong/UMD/tree_canopy");

// set the thresholds
var thtcc = 10;

var years = ee.List.sequence(1989,2013,1)

var rotation = ee.ImageCollection({

var startDate = ee.Date.fromYMD(y, 1, 1).advance(-1,"year")
var endDate = ee.Date.fromYMD(y, 12, 31).advance(-1,"year")
var past = ee.Image(tccCollection.filterDate(startDate,endDate).first())

var startDate = ee.Date.fromYMD(y, 1, 1)
var endDate = ee.Date.fromYMD(y, 12, 31)
var now = ee.Image(tccCollection.filterDate(startDate,endDate).first())

past = past.gte(thtcc)
now = now.eq(0)

var disturbance = past.and(now)
return disturbance.set("system:time_start",startDate);

var myImg = ee.Image(rotation.sum())

// display the image


Leave a Reply

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

You are commenting using your 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