Found 383702302, but onlyĮrror message indicates that the Congo Republic covers about 383 million Landsat Image.reduceRegion: Too many pixels in the region. Unfortunately, running the script as it is results in an error like: Loss, respectively), the sum of these values is equivalent to the number of pixels of loss
LossImage consists of pixels that have a value of 1 or 0 (for loss or not Pixels in lossImage within the congo feature. This example uses the ee.Reducer.sum() reducer to sum the values of the Sum the values of forest loss pixels in the Congo Republic. Var congo = countries.filter(ee.Filter.eq('country_na', 'Rep of the Congo')) Subset the Congo Republic feature from countries. Var countries = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017') For that purpose, consider the followingĬode Editor (JavaScript) // Load country features from Large Scale International Boundary (LSIB) dataset.
To represent forest loss during the study period. Image regions.) For example, suppose we want to calculate the number of pixels estimated Tutorial, the key method for calculating statistics in an image region is Loss that happened within the country's protected areas at the same time. That happened within the Congo Republic in the year 2012 to the amount of forest In this section, we'll compare the total amount of forest loss
(Learn more about feature collections and how to Vector dataset is represented as a FeatureCollection in Earth Engine. For this we'll need to use vector data (points, lines, and polygons). Use concepts learned so far to compute statistics about forest gain and loss in a region Now that you're more familiar with the bands in the Hansen et al. , 'Gain and Loss') Quantifying Forest Change in a Region of Interest Map.addLayer(treeCover.updateMask(treeCover), Var gainAndLoss = gainImage.and(lossImage) Use the and() method to create the lossAndGain image.
Var gfc2014 = ee.Image('UMD/hansen/global_forest_change_2015') Code Editor (JavaScript) // Displaying forest, loss, gain, and pixels where both loss and gain occur.