Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
Introduction to Forest Monitoring for Action (FORMA) data
Stay organized with collections
Save and categorize content based on your preferences.
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 2012, find pixels that have times between the
first day of 2012 and the first day of 2013, expressed in seconds since midnight,
January 1, 1970:
In this example, forma2012 is a binary image containing only those pixels
that have times occurring in 2012 (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 protected areas of the Congo Republic in 2012, build on the previous example as
follows:
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:
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 the Congo Republic protected areas 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 2012 alerts in the protected areas.
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 the rest are zero. This code makes such an image for
2012 and displays it along with other predicted deforestation layers:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eFORMA is a deforestation alerting system for humid tropical forests based on MODIS data, providing alerts with a corresponding time in epoch seconds.\u003c/p\u003e\n"],["\u003cp\u003eUsers can filter FORMA alerts by date, enabling analysis of deforestation events within specific timeframes.\u003c/p\u003e\n"],["\u003cp\u003eThe number of FORMA alerts within a region of interest or multiple regions can be calculated, facilitating quantitative assessment of deforestation.\u003c/p\u003e\n"],["\u003cp\u003eFORMA data can be compared with other datasets like Hansen et al.to identify areas where both indicate deforestation, offering a comprehensive analysis.\u003c/p\u003e\n"]]],[],null,["# Introduction to Forest Monitoring for Action (FORMA) data\n\nFORMA is a [MODIS](http://modis.gsfc.nasa.gov/about/) based 500 x 500\nmeter twice-monthly deforestation alerting system for the humid tropical forests. The\n[FORMA 500 dataset](/earth-engine/datasets/catalog/FORMA_FORMA_500m) in Earth\nEngine is an image with alerts starting in January 2006 and updated monthly. Each alert has a\ntime associated with it in a single band named `alert_date` in units of\n[epoch seconds](https://en.wikipedia.org/wiki/Unix_time). Filtering FORMA by dates\nand calculating alerts within areas of interest are two of the most important things you can\ndo with the FORMA dataset.\n\nFiltering FORMA by Date\n-----------------------\n\nTo show just those alerts that occur in 2012, find pixels that have times between the\nfirst day of 2012 and the first day of 2013, expressed in seconds since midnight,\nJanuary 1, 1970:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Convert dates from milliseconds to seconds.\nvar start = ee.Date('2012-01-01').millis().divide(1000);\nvar end = ee.Date('2013-01-01').millis().divide(1000);\n\n// Load the FORMA 500 dataset.\nvar forma = ee.Image('FORMA/FORMA_500m');\n\n// Create a binary layer from the dates of interest.\nvar forma2012 = forma.gte(start).and(forma.lte(end));\n\nMap.setCenter(15.87, -0.391, 7);\nMap.addLayer(\n forma2012.mask(forma2012),\n {palette: ['FF0000']},\n 'FORMA alerts in 2012'\n);\n```\n\nIn this example, `forma2012` is a binary image containing only those pixels\nthat have times occurring in 2012 (i.e. all other pixels are masked).\n\nCounting FORMA Alerts in a Region of Interest\n---------------------------------------------\n\n[As we did\nin the previous section](/earth-engine/tutorials/tutorial_forest_03#quantifying-forest-change-in-an-area-of-interest) with the Hansen et al. data, we can start by counting the\nnumber of FORMA alerts (pixels) in an area of interest. For example, to count the number\nof alerts in protected areas of the Congo Republic in 2012, build on the previous example as\nfollows:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Load country features from Large Scale International Boundary (LSIB) dataset.\nvar countries = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017');\n\n// Subset the Congo Republic feature from countries.\nvar congo = ee.Feature(\n countries\n .filter(ee.Filter.eq('country_na', 'Rep of the Congo'))\n .first()\n);\n\n// Subset protected areas to the bounds of the congo feature\n// and other criteria. Clip to the intersection with congo.\nvar protectedAreas = ee.FeatureCollection('WCMC/WDPA/current/polygons')\n .filter(ee.Filter.and(\n ee.Filter.bounds(congo.geometry()),\n ee.Filter.neq('IUCN_CAT', 'VI'),\n ee.Filter.neq('STATUS', 'proposed'),\n ee.Filter.lt('STATUS_YR', 2010)\n ))\n .map(function(feat){\n return congo.intersection(feat);\n });\n\n// Display protected areas on the map.\nMap.addLayer(\n protectedAreas,\n {color: '000000'},\n 'Congo Republic protected areas'\n);\n\n// Calculate the number of FORMA pixels in protected\n// areas of the Congo Republic, 2012.\nvar stats = forma2012.reduceRegion({\n reducer: ee.Reducer.sum(),\n geometry: protectedAreas.geometry(),\n scale: 500\n});\nprint('Number of FORMA pixels, 2012: ', stats.get('constant'));\n```\n\nCounting FORMA Alerts in Several Regions of Interest\n----------------------------------------------------\n\nSo far, we've been computing statistics in a single region at a time. For computing\nstatistics in multiple regions at once, you can use\n[`reduceRegions()`](/earth-engine/apidocs/ee-image-reduceregions). Again\nbuilding on the previous example:\n\n### Code Editor (JavaScript)\n\n```javascript\nvar regionsStats = forma2012.reduceRegions({\n collection: protectedAreas,\n reducer: ee.Reducer.sum(),\n scale: forma2012.projection().nominalScale()\n});\nprint(regionsStats);\n```\n\nExamine the object printed to the console and observe that the output of\n`reduceRegions()` is another `FeatureCollection`. Note that every\nregion in the collection of the Congo Republic protected areas now has an additional property,\n`sum`, named after the reducer. The value of this property is the output of\nthe reducer, or the number of 2012 alerts in the protected areas.\n\nComparing FORMA and Hansen et al. Datasets\n------------------------------------------\n\nTo compare the FORMA and Hansen et al. datasets, you can use logical operators.\n([Learn more about logical operations](/earth-engine/guides/image_relational)). Specifically, we'd\nlike to make an image in which pixels marked by both FORMA and the Hansen et al. data\nas deforestation are 1 and the rest are zero. This code makes such an image for\n2012 and displays it along with other predicted deforestation layers:\n\n### Code Editor (JavaScript)\n\n```javascript\n// Convert dates from milliseconds to seconds.\nvar start = ee.Date('2012-01-01').millis().divide(1000);\nvar end = ee.Date('2013-01-01').millis().divide(1000);\nvar region = ee.Geometry.Rectangle([-59.81163, -9.43348, -59.27561, -9.22818]);\n\n// Load the FORMA 500 dataset.\nvar forma = ee.Image('FORMA/FORMA_500m');\n\n// Create a binary layer from the dates of interest.\nvar forma2012 = forma.gte(start).and(forma.lte(end));\n\n// Load Hansen et al. data and get change in 2012.\nvar gfc = ee.Image('UMD/hansen/global_forest_change_2015');\nvar gfc12 = gfc.select(['lossyear']).eq(12);\n\n// Create an image which is one where the datasets\n// both show deforestation and zero elsewhere.\nvar gfc_forma = gfc12.eq(1).and(forma2012.eq(1));\n\n// Display data on the map.\nMap.setCenter(-59.58813, -9.36439, 11);\nMap.addLayer(forma.updateMask(forma), {palette: '00FF00'}, 'Forma (green)');\nMap.addLayer(gfc12.updateMask(gfc12), {palette: 'FF0000'}, 'Hansen (red)');\nMap.addLayer(\n gfc_forma.updateMask(gfc_forma),\n {palette: 'FFFF00'},\n 'Hansen & FORMA (yellow)'\n);\n```\n\nThis concludes the overview of forest change datasets in Earth Engine. We're looking\nforward to seeing what you can do with them!"]]