TransWikia.com

Reclassify and download raster in Google Earth Engine

Geographic Information Systems Asked on August 5, 2021

Playing with Google Earth Engine i’m trying to download Tree Cover Loss data for a country using the Hansen dataset ("UMD/hansen/global_forest_change_2019_v1_7").

I would like to download tree cover loss data from 2014 to 2019 for Cameroon using this script:

// select the Global forest Watch dataset 
var gfc = ee.Image('UMD/hansen/global_forest_change_2018_v1_6') 

// Create a variable and extract just the "lossyear" band from the GFW dataset
var tclYr = gfc.select('lossyear')

// Create a variable and select only the years from 2014 to 2019
var tclAll = tclYr.gte(14).and(tclYr.lte(19))

// Clip the tclALL on ivory coast (geometry created manually as rectangle)
var tcl_cameroon = tclAll.clip(geometry)

// Add layer to the map, without visualization parameters
Map.addLayer(tcl_cameroon)
// Map.addLayer(ESA_forest)


// Export image to Google Drive
Export.image.toDrive({
  image: tcl_cameroon,                 //  <----- put the image you want to download
  description: "tcl_cameroon",    //  <----- download with this filename
  scale: 30,                        //  <----- set the pixel size in meters
  //region: geometry
});

I realized that it takes too much and maybe could be faster if:

  • i reclassify years 14 to 19 as one class
  • i reclassify NODATA for the rest.
    Do you think the process will be faster? and filesize lighter?
    How could i do it?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP