1

I've a classified image and polygon. The classified image pixels have two type of values (0 and 1) where 1 represents urban and 0 represents non-urban land cover. I found some wrong classified pixels as urban land and I marked the pixels' boundary by a polygon. Now I want to change the pixels' value to 0 as non-urban land cover in the polygon.

I tried to do that after converting the polygon to raster and set its value as 0. Then, I multiplied it with the main image but it didn't work.

Here is my code:

var mainImage = image1
var polygonImage = polygon.reduceToImage({
    properties: ['type'],
    reducer: ee.Reducer.first()
}).multiply(ee.Image(0));

var finalImage=mainImage.multiply(polygonImage);

I'm looking for an effective solution regarding the issue.

0

0

Browse other questions tagged or ask your own question.