geoutils.Raster.get_stats

geoutils.Raster.get_stats#

Raster.get_stats(stats_name=None, inlier_mask=None, band=1, counts=None)[source]#

Retrieve specified statistics or all available statistics for the raster data. Allows passing custom callables to calculate custom stats.

Parameters:
Return type:

floating[Any] | dict[str, floating[Any]]

Returns:

The requested statistic or a dictionary of statistics if multiple or all are requested.