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.

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()

maximum(self, index: int) -> float Returns the maximum values of the computed statistics at index.

See also

setMaximum()

Return type:

List[float]

minimum(self) List[float][source]

Returns the minimum values of the computed statistics.

See also

setMinimum()

minimum(self, index: int) -> float Returns the minimum value of the computed statistics at index.

See also

setMinimum()

Return type:

List[float]

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

Sets the maximum values of the computed statistics.

See also

maximum()

setMaximum(self, index: int, maximum: float) -> bool Sets the maximum value of the computed statistics at index.

Returns:

True if value has been set.

See also

maximum()

Parameters:

maximum (Iterable[float])

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

Sets the minimum values of the computed statistics.

See also

minimum()

setMinimum(self, index: int, minimum: float) -> bool Sets the minimum value of the computed statistics at index.

Returns:

True if value has been set.

See also

minimum()

Parameters:

minimum (Iterable[float])