0

I am trying to extract an ecoregion specified in the Ecoregions 2017 Resolve Data in Google Earth Engine in order to then to examine forest loss and gain (using the Hansen data set) from that ecoregion (tapajos xingu in Brazil). How do I specify the ecoregion tapajos xingu in the Ecoregions 2017 Resolve Data in Google Earth Engine?

var fc = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017') .map(function(f) { 
  var c = ee.String(f.get('COLOR')).slice(1); 
  return f .set('R', ee.Number.parse(c.slice(0, 2), 16)) 
  .set('G', ee.Number.parse(c.slice(2, 4), 16)) .set('B', ee.Number.parse(c.slice(4, 6), 16)); 
}); 

var base = ee.Image(0).mask(0).toInt8(); 

Map.addLayer(base.paint(fc, 'R') .addBands(base.paint(fc, 'G') .addBands(base.paint(fc, 'B'))), {gamma: 0.3}); 

This is the code for Ecoregions 2017 Resolve Data

  • How do I specify the ecoregion tapajos xingu in the Ecoregions 2017 Resolve Data in google earth engine? – sll28 Apr 8 at 11:43
  • var fc = ee.FeatureCollection('RESOLVE/ECOREGIONS/2017') .map(function(f) { var c = ee.String(f.get('COLOR')).slice(1); return f .set('R', ee.Number.parse(c.slice(0, 2), 16)) .set('G', ee.Number.parse(c.slice(2, 4), 16)) .set('B', ee.Number.parse(c.slice(4, 6), 16)); }); var base = ee.Image(0).mask(0).toInt8(); Map.addLayer(base.paint(fc, 'R') .addBands(base.paint(fc, 'G') .addBands(base.paint(fc, 'B'))), {gamma: 0.3}); This is the code for Ecoregions 2017 Resolve Data – sll28 Apr 8 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.