Repository navigation
Accumulated Class
Script: codes/analysis_9_accumulated.js. The calculation is in the function getAccumulatedClass.
Description: Marks every pixel that was classified as the targetClass in at least one year of the series (1985–2024), with the target class as its value.
What it shows: It maps the total footprint or "historical reach" of a land use, including areas that have since been abandoned or converted. In the example, pixels A, C and D are all in the pasture footprint, even though D was pasture for only two years and is soybean in 2024. It is a tool for analyzing the maximum expansion or the total area ever affected by a land cover type.
Set at the top of the script; change them before running.
| variable | default | meaning |
|---|---|---|
targetClass |
15 (Pasture) |
class of interest, a MapBiomas legend code |
asset |
Collection 10.1 coverage asset | the multi-band image read by the script |
years |
1985 … 2024 | years included in the series |
bandPrefix |
'classification_' |
band names are bandPrefix + year
|
Besides a land cover reference layer (hidden by default), the script adds:
| layer | value | colors |
|---|---|---|
Class 15 Accumulated |
the target class (15) | MapBiomas legend colors |
Pixels with no result are masked and appear transparent.
Copy the whole script into the Google Earth Engine Code Editor, adjust the parameters and click Run. See Home for the example pixels used in the figure.