I am trying to compute the Forest Loss by Year using the Global Forest Change (Hansen et al.). I have computed it using Engine Earth and Rasterstats (Python) and the estimates I obtain are a too high when compared with other sources (official statistics). Specifically, The Hansen dataset shows a large increase in tree loss during the year 2016. Also the loss during the last ten years 2011-2020 is estimated to be around 300 000 km2 in the Hansen dataset whereas it is around 100 000 in other sources. I include the code (Earth Engine) I am using to compute the estimates.

Can anyone provide any insights on this?

    var gfc2020 = ee.Image("UMD/hansen/global_forest_change_2020_v1_8"),
        brazil = ee.FeatureCollection("users/milfadic/brazil_muni");

    var lossYear = gfc2020.select(['lossyear']);
    var muni = brazil_simp.select(['fid']);
    var lossAreaImage = lossYear.multiply(ee.Image.pixelArea());

    var lossByYearArea = lossYear.addBands(lossYear).reduceRegions({
      collection: brazil,
      reducer: ee.Reducer.sum().group({
        groupField: 1
      scale: 30,

      collection: lossByYearArea,
      description: 'forest_lossAreaImage _all_muni',
      folder: 'Brazil_muni',
      fileFormat: 'CSV'

1 Answer 1


The lossyear band is a number between 1 and 20 indicating in what year the treecover loss was detected. You should multiply a binary mask of loss by .pixelArea(), not a year of loss. Even though you are not using that further in your script, it just important to mention.

If you want to calculate loss per year, this can be a useful starting point: https://code.earthengine.google.com/27993efe7ce32bd591e81246b76199db

Also remember that the forest definition might be different in different countries (often we use 15% or 30% threshold for treecover).

  • One more comment. When asking for help - make sure you have shared your assets. In your current example the script generates an error: FeatureCollection (Error) Collection.loadTable: Collection asset 'users/milfadic/brazil_muni' not found.. I could sort it out with some sample data, but it's just faster to debug if input data is shared. Commented Nov 25, 2021 at 21:41
  • 1
    For answers requiring code please always provide a code snippet (not just a link to code) illustrating how it applies to the question.
    – PolyGeo
    Commented Jan 7, 2022 at 23:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.