rasterinlay

find_blocks(raster: numpy.ndarray, block_shape: tuple, outvalue: Union[str, int, float] = 0)[source]

Identify all single-valued blocks within a raster.

Parameters
  • raster – A 2D .numpy.ndarray in which blocks with an identical value should be found

  • block_shape – Height and width (in number of pixles) of a block

  • outvalue – The background value in raster that should be ignored in the same value counting.

Returns

Collection of blocks found in raster. Blocks are specified with slices thus a single block can be passed as index to raster.

Return type

list

imprint_constraints(raster, constraints, bblocks, inlay_callback_kwargs: dict, data_type: rasterinlay.distribute.CombineTypes = CombineTypes.fill) Tuple[dict, dict][source]

Warning

Function in under construction.

Submodules