Esempio n. 1
0
 def _apply_band_math(dataset):
     clear_mask = task.satellite.get_clean_mask_func()(dataset)
     # mask out water manually. Necessary for frac. cover.
     wofs = wofs_classify(dataset, clean_mask=clear_mask, mosaic=True)
     clear_mask[wofs.wofs.values == 1] = False
     return frac_coverage_classify(dataset,
                                   clean_mask=clear_mask,
                                   no_data=task.satellite.no_data_value)
Esempio n. 2
0
    def _apply_band_math(dataset):
        clear_mask = create_cfmask_clean_mask(
            dataset.cf_mask) if 'cf_mask' in dataset else create_bit_mask(
                dataset.pixel_qa, [1, 2])
        # mask out water manually. Necessary for frac. cover.
        wofs = wofs_classify(dataset, clean_mask=clear_mask, mosaic=True)
        clear_mask[wofs.wofs.values == 1] = False

        return frac_coverage_classify(dataset, clean_mask=clear_mask)
Esempio n. 3
0
 def _apply_band_math(ds, idx):
     # mask out water manually. Necessary for frac. cover.
     wofs = wofs_classify(ds, clean_mask=clear_mask[idx], mosaic=True)
     clear_mask[
         idx] = False if wofs.wofs.values[0] == 1 else clear_mask[idx]
     fractional_cover = frac_coverage_classify(
         ds,
         clean_mask=clear_mask[idx],
         no_data=task.satellite.no_data_value)
     return fractional_cover