Class: QgsRasterMinMaxOrigin

Describes the origin of minimum and maximum values in a raster.

It does not store by itself the min/max values.

class qgis.core.QgsRasterMinMaxOrigin[source]

Bases: object

CUMULATIVE_CUT_LOWER: float = 0.02
CUMULATIVE_CUT_UPPER: float = 0.98
DEFAULT_STDDEV_FACTOR: float = 2.0
Extent

alias of RasterRangeExtent

Limits

alias of RasterRangeLimit

StatAccuracy

alias of RasterRangeAccuracy

cumulativeCutLower(self) float[source]

Returns the lower bound of cumulative cut method (between 0 and 1).

Return type:

float

cumulativeCutUpper(self) float[source]

Returns the upper bound of cumulative cut method (between 0 and 1).

Return type:

float

extent(self) Qgis.RasterRangeExtent[source]

Returns the raster extent.

Return type:

Qgis.RasterRangeExtent

static extentFromString(extent: str | None) Qgis.RasterRangeExtent[source]

Deserialize Extent

Parameters:

extent (Optional[str])

Return type:

Qgis.RasterRangeExtent

static extentString(extent: Qgis.RasterRangeExtent) str[source]

Returns a string to serialize Extent

Parameters:

extent (Qgis.RasterRangeExtent)

Return type:

str

limits(self) Qgis.RasterRangeLimit[source]

Returns the raster limits.

Return type:

Qgis.RasterRangeLimit

static limitsFromString(limits: str | None) Qgis.RasterRangeLimit[source]

Deserialize Limits

Parameters:

limits (Optional[str])

Return type:

Qgis.RasterRangeLimit

static limitsString(limits: Qgis.RasterRangeLimit) str[source]

Returns a string to serialize Limits

Parameters:

limits (Qgis.RasterRangeLimit)

Return type:

str

readXml(self, elem: QDomElement)[source]

Deserialize object.

Parameters:

elem (QDomElement)

setCumulativeCutLower(self, val: float)[source]

Sets the lower bound of cumulative cut method (between 0 and 1).

Parameters:

val (float)

setCumulativeCutUpper(self, val: float)[source]

Sets the upper bound of cumulative cut method (between 0 and 1).

Parameters:

val (float)

setExtent(self, extent: Qgis.RasterRangeExtent)[source]

Sets the extent.

Parameters:

extent (Qgis.RasterRangeExtent)

setLimits(self, limits: Qgis.RasterRangeLimit)[source]

Sets the limits.

Parameters:

limits (Qgis.RasterRangeLimit)

setStatAccuracy(self, accuracy: Qgis.RasterRangeAccuracy)[source]

Sets the statistics accuracy.

Parameters:

accuracy (Qgis.RasterRangeAccuracy)

setStdDevFactor(self, val: float)[source]

Sets the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ]

Parameters:

val (float)

statAccuracy(self) Qgis.RasterRangeAccuracy[source]

Returns the raster statistic accuracy.

Return type:

Qgis.RasterRangeAccuracy

static statAccuracyFromString(accuracy: str | None) Qgis.RasterRangeAccuracy[source]

Deserialize StatAccuracy

Parameters:

accuracy (Optional[str])

Return type:

Qgis.RasterRangeAccuracy

static statAccuracyString(accuracy: Qgis.RasterRangeAccuracy) str[source]

Returns a string to serialize StatAccuracy

Parameters:

accuracy (Qgis.RasterRangeAccuracy)

Return type:

str

stdDevFactor(self) float[source]

Returns the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ]

Return type:

float

writeXml(self, doc: QDomDocument, parentElem: QDomElement)[source]

Serialize object.

Parameters:
  • doc (QDomDocument)

  • parentElem (QDomElement)