I have a classification that goes from 1985 to 2020. I would like to reclassify them all to values of 0 and 1, that is, vegetation and not vegetation.
I tried using the .remap()
function, but I must specify a band and it only works for one.
var asset = "projects/mapbiomas-workspace/public/collection6/mapbiomas_collection60_integration_v1";
var mapbiomas = ee.Image(asset).selfMask();
var or = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
var new = [1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
var mapbiomas_1985 = mapbiomas.remap({
from: or,
to: new,
defaultValue: 0,
bandName: 'classification_1985'
});