Exemplo n.º 1
0
 def __init__(self, dsm_path=None, terrain_buffer=0):
     self.dsm_path = dsm_path
     self.terrain_buffer = terrain_buffer
     self.output_measurements = {m['name']: Measurement(**m) for m in WOFS_OUTPUT}
     if dsm_path is None:
         # TODO: This should be recorded in the dataset metadata, but we haven't allowed for this
         # in Transformation classes.
         _LOG.warning('WARNING: Path or URL to a DSM is not set. Terrain shadow mask will not be calculated.')
Exemplo n.º 2
0
 def measurements(self, input_measurements):
     return {
         'classification':
         Measurement(name='classification',
                     dtype='uint8',
                     nodata=0,
                     units='1')
     }
Exemplo n.º 3
0
 def measurements(self, input_measurements):
     return {
         'vegetat_veg_cat':
         Measurement(name='vegetat_veg_cat',
                     dtype='float32',
                     nodata=float('nan'),
                     units='1')
     }
Exemplo n.º 4
0
 def __init__(self, dsm_path=None, terrain_buffer=0, c2=False):
     self.dsm_path = dsm_path
     self.terrain_buffer = terrain_buffer
     self.c2 = c2
     self.output_measurements = {
         m['name']: Measurement(**m)
         for m in WOFS_OUTPUT
     }
     if dsm_path is None:
         _LOG.warning(
             'WARNING: Path or URL to a DSM is not set. Terrain shadow mask will not be calculated.'
         )
Exemplo n.º 5
0
    def __init__(self, median_path=None, indstr=None, n_workers=2):

        # directory or location where the long term mean of indices locate
        self.median_path = median_path
        # Patterns of indices file,.e.g '56HLH_{}_2015-01-01_2020-12-31-cog.tif'
        self.indstr = indstr
        # number of workers of Dask client
        self.n_workers = n_workers

        self.output_measurements = {
            m['name']: Measurement(**m)
            for m in NMASK_OUTPUT
        }
Exemplo n.º 6
0
 def measurements(self, input_measurements):
     return {'cultman_agr_cat': Measurement(name='cultman_agr_cat', dtype='float32', nodata=float('nan'), units='1')}