I'm a beginner at GE and JavaScript code. I want to apply two masks to a Landsat composition that is already done in the code.
First I've done the raster upload (that I want to be a mask), which I called "image1". Second, I want a mask that will delete pixels that are smaller than 1 ha.
The mask doesn't appear in the final result, where is the problem?
var mascara = function (image) {
// Develop masks for anthropized area.
var qaMaska = image1.select("b1")
return image.updateMask(qaMaska)
}
var pixels = function (image) {
// Develop masks for pixels larger than 1000 ha.
var minArea = 10000
var maxSize = 200
var pixelCount = hx.connectedPixelCount(maxSize)
var minPixelCount = ee.Image(minArea).divide(ee.Image.pixelArea())
var agricFin = hx.updateMask(pixelCount.gte(minPixelCount))
}
Here is the link: https://code.earthengine.google.com/a6e853ef1b50056e273ff5d63ece3e7b
Get Link
button from the Code Editor and update the question with that link - current link doesn't work. Make sure all assets used are shared. You should also try to reduce your script, rewrite it in a way that only focuses on your question. It will significantly increase your chance of getting help.