extract_zonal_outliers

eolab.georastertools.processing.stats.extract_zonal_outliers(geoms: GeoDataFrame, image: str, outliers_image: str, prefix: List[str] | None = None, bands: List[int] = [1], sigma: float = 2)[source]

Extract the outliers of an input image and store the results in a new image where all outliers are written with their real values and other pixels are stored with the mean value. The outliers are computed for each geometry. The stats mean and std of the geometries shall have been computed by the function compute_zonal_stats.

Parameters:
  • geoms (GeoDataFrame) – Geometries that contain as metadata the statistics (at least the mean and std)

  • image (str) – Filename of the input image to process

  • outliers_image (str) – Filename of the ioutput image

  • prefix ([str]) – Add a prefix to the stats keys. Must have the same size as bands

  • bands ([int], optional, default=[1]) – List of bands to process in the input image

  • sigma (float, optional, default=2) – Distance (in sigma) to the mean value to consider a point as an outlier