sits icon indicating copy to clipboard operation
sits copied to clipboard

Include band masking for classification and apply operation

Open gilbertocamara opened this issue 2 years ago • 1 comments

Provide support for a "MASK", which defines areas to be included or excluded from classification. The mask band can be built based on a user-defined shapefile (or sf object). After classification, depending on the user choice, points inside (or outside) the mask are marked as "NA". The post-processing functions such as sits_smooth(), sits_label_classification(), and sits_uncertainty() should return "NA" when the input is "NA".

The sits_classify() functions needs two new parameters: (a) mask, defined as a shapefile or sf object; (b) mask_validity (either TRUE or FALSE).

gilbertocamara avatar May 30 '22 20:05 gilbertocamara

  • Implement mask as a new function sits_mask(cube_out, cube_in, ..., output_dir)
  • Expressions to be converted should be passed to ...
  • Example:
sits_reclassify(
   cube = ro_class,
   mask = prodes2021,
  "VegSec" = cube == "Forest" & mask == "OldDeforestation"
)

rolfsimoes avatar Aug 08 '22 23:08 rolfsimoes