Présentation des données de surveillance des forêts pour l'action (FORMA)
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
FORMA est un système d'alerte de déforestation bimensuel de 500 x 500 mètres basé sur MODIS pour les forêts tropicales humides. L'ensemble de données FORMA 500 dans Earth Engine est une image avec des alertes à partir de janvier 2006, qui est mise à jour tous les mois. Chaque alerte est associée à une heure dans une seule bande nommée alert_date
, en secondes epoch. Filtrer les données FORMA par dates et calculer les alertes dans des zones d'intérêt sont deux des actions les plus importantes que vous pouvez effectuer avec l'ensemble de données FORMA.
Pour n'afficher que les alertes qui se sont produites en 2012, recherchez les pixels dont les heures sont comprises entre le premier jour de 2012 et le premier jour de 2013, exprimées en secondes depuis minuit le 1er janvier 1970 :
Éditeur de code (JavaScript)
// Convert dates from milliseconds to seconds.
var start = ee.Date('2012-01-01').millis().divide(1000);
var end = ee.Date('2013-01-01').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 forma2012 = forma.gte(start).and(forma.lte(end));
Map.setCenter(15.87, -0.391, 7);
Map.addLayer(
forma2012.mask(forma2012),
{palette: ['FF0000']},
'FORMA alerts in 2012'
);
Dans cet exemple, forma2012
est une image binaire contenant uniquement les pixels dont les heures se situent en 2012 (c'est-à-dire que tous les autres pixels sont masqués).
Comme nous l'avons fait dans la section précédente avec les données de Hansen et al., nous pouvons commencer par compter le nombre d'alertes FORMA (pixels) dans une zone d'intérêt. Par exemple, pour compter le nombre d'alertes dans les zones protégées de la République du Congo en 2012, reprenez l'exemple précédent comme suit :
Éditeur de code (JavaScript)
// Load country features from Large Scale International Boundary (LSIB) dataset.
var countries = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017');
// Subset the Congo Republic feature from countries.
var congo = ee.Feature(
countries
.filter(ee.Filter.eq('country_na', 'Rep of the Congo'))
.first()
);
// Subset protected areas to the bounds of the congo feature
// and other criteria. Clip to the intersection with congo.
var protectedAreas = ee.FeatureCollection('WCMC/WDPA/current/polygons')
.filter(ee.Filter.and(
ee.Filter.bounds(congo.geometry()),
ee.Filter.neq('IUCN_CAT', 'VI'),
ee.Filter.neq('STATUS', 'proposed'),
ee.Filter.lt('STATUS_YR', 2010)
))
.map(function(feat){
return congo.intersection(feat);
});
// Display protected areas on the map.
Map.addLayer(
protectedAreas,
{color: '000000'},
'Congo Republic protected areas'
);
// Calculate the number of FORMA pixels in protected
// areas of the Congo Republic, 2012.
var stats = forma2012.reduceRegion({
reducer: ee.Reducer.sum(),
geometry: protectedAreas.geometry(),
scale: 500
});
print('Number of FORMA pixels, 2012: ', stats.get('constant'));
Jusqu'à présent, nous avons calculé les statistiques dans une seule région à la fois. Pour calculer des statistiques dans plusieurs régions à la fois, vous pouvez utiliser reduceRegions()
. Encore une fois, en s'appuyant sur l'exemple précédent :
Éditeur de code (JavaScript)
var regionsStats = forma2012.reduceRegions({
collection: protectedAreas,
reducer: ee.Reducer.sum(),
scale: forma2012.projection().nominalScale()
});
print(regionsStats);
Examinez l'objet imprimé dans la console et notez que la sortie de reduceRegions()
est un autre FeatureCollection
. Notez que chaque région de la collection des zones protégées de la République du Congo dispose désormais d'une propriété supplémentaire, sum
, nommée d'après le réducteur. La valeur de cette propriété correspond à la sortie du réducteur ou au nombre d'alertes de 2012 dans les zones protégées.
Pour comparer les ensembles de données FORMA et Hansen et al., vous pouvez utiliser des opérateurs logiques.
(En savoir plus sur les opérations logiques) Plus précisément, nous souhaitons créer une image dans laquelle les pixels marqués comme déforestation à la fois par FORMA et par les données de Hansen et al. sont définis sur 1, et les autres sur 0. Ce code crée une image de ce type pour 2012 et l'affiche avec d'autres calques de déforestation prévus :
Éditeur de code (JavaScript)
// Convert dates from milliseconds to seconds.
var start = ee.Date('2012-01-01').millis().divide(1000);
var end = ee.Date('2013-01-01').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 forma2012 = forma.gte(start).and(forma.lte(end));
// Load Hansen et al. data and get change in 2012.
var gfc = ee.Image('UMD/hansen/global_forest_change_2015');
var gfc12 = gfc.select(['lossyear']).eq(12);
// Create an image which is one where the datasets
// both show deforestation and zero elsewhere.
var gfc_forma = gfc12.eq(1).and(forma2012.eq(1));
// Display data on the map.
Map.setCenter(-59.58813, -9.36439, 11);
Map.addLayer(forma.updateMask(forma), {palette: '00FF00'}, 'Forma (green)');
Map.addLayer(gfc12.updateMask(gfc12), {palette: 'FF0000'}, 'Hansen (red)');
Map.addLayer(
gfc_forma.updateMask(gfc_forma),
{palette: 'FFFF00'},
'Hansen & FORMA (yellow)'
);
Ceci conclut la présentation des ensembles de données sur l'évolution des forêts dans Earth Engine. Nous avons hâte de découvrir ce que vous allez créer avec !
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[null,null,["Dernière mise à jour le 2025/07/26 (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!"]]