Introduction to Forest Monitoring for Action (FORMA) data

FORMA is a MODIS based 500 x 500 meter twice-monthly deforestation alerting system for the humid tropical forests. The FORMA 500 dataset in Earth Engine is an image with alerts starting in January 2006 and updated monthly. Each alert has a time associated with it in a single band named alert_date in units of epoch seconds. Filtering FORMA by dates and calculating alerts within areas of interest are two of the most important things you can do with the FORMA dataset.

Filtering FORMA by Date

To show just those alerts that occur in 2011, find pixels that have times between the first day of 2011 and the first day of 2012, expressed in seconds since midnight, January 1, 1970:

// Convert dates from milliseconds to seconds.
var start = ee.Date('2011-01-01').millis().divide(1000);
var end = ee.Date('2011-12-31').millis().divide(1000);

// Load the FORMA 500 dataset.
var forma = ee.Image('FORMA/FORMA_500m');

// Create a binary layer from the dates of interest.
var forma2011 = forma.gte(start).and(forma.lte(end));

Map.setCenter(102.1461, 1.3944, 11);
Map.addLayer(
    forma2011.mask(forma2011), {palette: ['FF0000']}, 'FORMA alerts in 2011');

In this example, forma2011 is a binary image containing only those pixels that have times occurring in 2011 (i.e. all other pixels are masked).

Counting FORMA Alerts in a Region of Interest

As we did in the previous section with the Hansen et al. data, we can start by counting the number of FORMA alerts (pixels) in an area of interest. For example, to count the number of alerts in a palm oil concession in 2011, build on the previous example as follows:

var palmOil = ee.FeatureCollection(
    'ft:1Q-5XgXQpAeRhILPoPTx8gnGTzUpSJx-EtKu_BCw', 'geometry');
var aConcession =
    palmOil.filter(ee.Filter.eq('name', 'PT. MESKOM AGRO SARIMAS'));

Map.centerObject(aConcession);
Map.addLayer(aConcession, {color: 'FFFFFF'}, 'concession');

var stats = forma2011.reduceRegion({
  reducer: ee.Reducer.sum(),
  geometry: aConcession.geometry(),
  scale: forma2011.projection().nominalScale()
});
print('Number of FORMA pixels, 2011: ', stats.get('constant'));

Counting FORMA Alerts in Several Regions of Interest

So far, we've been computing statistics in a single region at a time. For computing statistics in multiple regions at once, you can use reduceRegions(). Again building on the previous example:

var regionsStats = forma2011.reduceRegions({
  collection: palmOil,
  reducer: ee.Reducer.sum(),
  scale: forma2011.projection().nominalScale()
});
print(regionsStats);

Examine the object printed to the console and observe that the output of reduceRegions() is another FeatureCollection. Note that every region in the collection of palm oil concessions now has an additional property, sum, named after the reducer. The value of this property is the output of the reducer, or the number of 2011 alerts in the concession.

Comparing FORMA and Hansen et al. Datasets

To compare the FORMA and Hansen et al. datasets, you can use logical operators. (Learn more about logical operations.) Specifically, we'd like to make an image in which pixels marked by both FORMA and the Hansen et al. data as deforestation are 1 and and the rest are zero. This code makes such an image for 2011 and displays it along with other predicted deforestation layers:

// Convert dates from milliseconds to seconds.
var start = ee.Date('2011-01-01').millis().divide(1000);
var end = ee.Date('2011-12-31').millis().divide(1000);
var region = ee.Geometry.Rectangle([-59.81163, -9.43348, -59.27561, -9.22818]);

// Load the FORMA 500 dataset.
var forma = ee.Image('FORMA/FORMA_500m');

// Create a binary layer from the dates of interest.
var forma2011 = forma.gte(start).and(forma.lte(end));

// Load Hansen et al data and get change in 2011.
var gfc = ee.Image('UMD/hansen/global_forest_change_2015');
var gfc11 = gfc.select(['lossyear']).eq(11);

// Create an image which is one where the datasets
// both show deforestation and zero elsewhere.
var gfc_forma = gfc11.eq(1).and(forma2011.eq(1));

Map.setCenter(-59.58813, -9.36439, 11);
Map.addLayer(forma.updateMask(forma), {palette: '00FF00'}, 'Forma (green)');
Map.addLayer(gfc11.updateMask(gfc11), {palette: 'FF0000'}, 'Hansen (red)');
Map.addLayer(
    gfc_forma.updateMask(gfc_forma), {palette: 'FFFF00'},
    'Hansen & FORMA (yellow)');

This concludes the overview of forest change datasets in Earth Engine. We're looking forward to seeing what you can do with them!

Send feedback about...

Google Earth Engine API