- forestatrisk.countpix(input_raster, value=1, blk_rows=0)[source]¶
Count the number of pixels having a specific value.
Count the number of pixels (and the corresponding area in ha) having a specific value.
- Parameters:
input_raster – Input raster file.
value – Target value.
blk_rows – if > 0, number of lines per block.
- Returns:
A dictionary with the number of pixels having the specified value (npix) and the total area (area, in ha).