New answers tagged

0

Your code seems to be doing what it should, however you are adding unnecessary bits. Your code var filterNight = function(image){ var qa = image.select('QC_Night'); var bitMask2 = 1 << 2; var bitMask3 = 1 << 3; var mask = qa.bitwiseAnd(bitMask2).eq(0).and(qa.bitwiseAnd(bitMask3).eq(0)); return image.updateMask(mask); }; If you look ...


1

I am posting my successful model thanks to the help of @Hornbydd. Each cell feature in the polygon grid has a unique ID attribute (PLSSID) that matches the name of each associated raster. I made a model using Iterate Feature Selection to run through each polygon feature based on this unique PLSSID attribute. The output feature becomes the clipping extent in ...


0

This can be done simply with one function that you map to every image of the collection. var apply_Mean_Mask = function(image){ var ndvi = image.select('NDVI'); var ndvi_mean = ndvi.reduceRegion({ reducer: ee.Reducer.mean(), geometry: geometry, scale: 20, maxPixels: 10e18, }).getNumber("NDVI"); return ...


1

You need to have the raster name match the grid cell so you can match the geometry with the raster. For example top left raster is called r1 so the cell needs to be tagged with r1, top right is r2 so the cell is tagged with r2 and so on. Then a simple model iterating over the cell values will allow you to identify the raster and run it through the clip tool. ...


1

With regard to the naming issue, I'm not sure what you are trying to do with gsub. You don't use any indexing in "fname" so the name isn't changing between iterations of your loop, which could be why you are getting this naming system. I'd suggest something like: fname <- paste0("filename_", i, ".tiff")


0

The image's mask is separate from the numerical value. If the mask is 1 (unmasked), the value can still be 0 or 1 (or anything else). Self-masking causes all the 0 values in the image to become masked (no value) instead of 0.


Top 50 recent answers are included