Zonalstats.with_geometries

Zonalstats.with_geometries(geometries: str, within: bool = False)[source]

Set up the geometries where to compute stats.

Parameters:
  • geometries (str) – Name of the file containing the geometries where to compute zonal stats. If not set, stats are computed on the whole raster image

  • within (bool, optional, default=False) – Whether to compute stats only for geometries within the raster. If False, statistics are computed for geometries that intersect the raster shape.

Returns:

the current instance so that it is possible to chain the with… calls (fluent API)

Return type:

eolab.georastertools.Zonalstats