wradlib.zonalstats.ZonalStatsBase#

class wradlib.zonalstats.ZonalStatsBase(src=None, ix=None, w=None)[source]#

Base class for all 2-dimensional zonal statistics.

The base class for computing 2-dimensional zonal statistics for target polygons from source points or polygons as built up with ZonalDataBase and derived classes. Provides the basic design for all other classes.

If no source points or polygons can be associated to a target polygon (e.g. no intersection), the zonal statistic for that target will be NaN.

Parameters:

src (wradlib.zonalstats.ZonalDataPoly or str) – ZonalDataPoly object or filename pointing to ZonalDataPoly ESRI shapefile containing necessary ZonalData ZonalData is available as zdata-property inside class instance.

Examples

See ZonalStats.

__init__(src=None, ix=None, w=None)[source]#

Methods

__init__([src, ix, w])

check_empty()

mean(vals)

Evaluate (weighted) zonal mean for values given at the source points.

var(vals)

Evaluate (weighted) zonal variance for values given at the source points.

Attributes

ix

w

zdata