rasterinlay.helpers¶
- block_contours(raster_shape: tuple, blocks: Iterable[tuple], bordervalue: numpy.uint8 = 255)[source]¶
Create 2D
numpy.ndarray
in the shape of ‘raster’ with contours.- Parameters
raster_shape – Height and width (in number of pixles) of the raster
blocks – Collection of block slices for which contours should be made
- Returns
2D numpy.ndarray in the shape of raster_shape with all zeros except for the contours of the provided blocks.
- Return type