Class: QgsRenderedLayerStatistics

Contains computed statistics for a layer render.

Added in version 3.42.

Class Hierarchy

Inheritance diagram of qgis.core.QgsRenderedLayerStatistics

Base classes

QgsRenderedItemDetails

Base class for detailed information about a rendered item.

Methods

maximum

Returns the maximum values of the computed statistics.

minimum

Returns the minimum values of the computed statistics.

setMaximum

Sets the maximum values of the computed statistics.

setMinimum

Sets the minimum values of the computed statistics.

class qgis.core.QgsRenderedLayerStatistics[source]

Bases: QgsRenderedItemDetails

__init__(layerId: str | None, minimum: Iterable[float], maximum: Iterable[float])

Constructor for QgsRenderedLayerStatistics from a list of minimum and maximum.

This is used to store the minimum and maximum values of a layer. Many values may be stored. For example, a raster layer may have multiple bands. In that case, minimum will contain the minimum value of each band and maximum will contain the maximum value of each band.

Parameters:
  • layerId (Optional[str])

  • minimum (Iterable[float])

  • maximum (Iterable[float])

__init__(layerId: str | None, minimum: float | None = Py_None, maximum: float | None = Py_None)

Constructor for QgsRenderedLayerStatistics with only one value for minimum and maximum.

Parameters:
  • layerId (Optional[str])

  • minimum (Optional[float] = Py_None)

  • maximum (Optional[float] = Py_None)

__init__(a0: QgsRenderedLayerStatistics)
Parameters:

a0 (QgsRenderedLayerStatistics)

maximum(self) List[float][source]

Returns the maximum values of the computed statistics.

See also

setMaximum()

Return type:

List[float]

maximum(self, index: int) float[source]

Returns the maximum values of the computed statistics at index.

See also

setMaximum()

Parameters:

index (int)

Return type:

float

minimum(self) List[float][source]

Returns the minimum values of the computed statistics.

See also

setMinimum()

Return type:

List[float]

minimum(self, index: int) float[source]

Returns the minimum value of the computed statistics at index.

See also

setMinimum()

Parameters:

index (int)

Return type:

float

setMaximum(self, maximum: Iterable[float])[source]

Sets the maximum values of the computed statistics.

See also

maximum()

Parameters:

maximum (Iterable[float])

setMaximum(self, index: int, maximum: float) bool[source]

Sets the maximum value of the computed statistics at index.

Return type:

bool

Returns:

True if value has been set.

See also

maximum()

Parameters:
  • index (int)

  • maximum (float)

setMinimum(self, minimum: Iterable[float])[source]

Sets the minimum values of the computed statistics.

See also

minimum()

Parameters:

minimum (Iterable[float])

setMinimum(self, index: int, minimum: float) bool[source]

Sets the minimum value of the computed statistics at index.

Return type:

bool

Returns:

True if value has been set.

See also

minimum()

Parameters:
  • index (int)

  • minimum (float)