Subgroup: Raster

Class: QgsRasterIdentifyResult

class qgis.core.QgsRasterIdentifyResult

Bases: sip.wrapper

Constructor for QgsRasterIdentifyResult.

QgsRasterIdentifyResult(format: QgsRaster.IdentifyFormat, results: Dict[int, Any]) Constructor. Creates valid result.

Parameters:
  • format – the result format
  • results – the results

QgsRasterIdentifyResult(error: QgsError) Constructor. Creates invalid result with error.

Parameters:error – the error

QgsRasterIdentifyResult(QgsRasterIdentifyResult)

Raster identify results container.

Methods

error Returns the last error
format Returns the results format.
isValid Returns true if valid
params Gets map of optional parameters
results Returns the identify results.
setError Sets the last error
setParams Sets map of optional parameters

Signals

Attributes

error(self) → QgsError

Returns the last error

format(self) → QgsRaster.IdentifyFormat

Returns the results format.

isValid(self) → bool

Returns true if valid

params(self) → Dict[str, Any]

Gets map of optional parameters

results(self) → Dict[int, Any]

Returns the identify results. Results are different for each format: QgsRaster.IdentifyFormatValue: map of values for each band, keys are band numbers (from 1). QgsRaster.IdentifyFormatFeature: map of QgsRasterFeatureList for each sublayer (WMS) QgsRaster.IdentifyFormatHtml: map of HTML strings for each sublayer (WMS).

setError(self, error: QgsError)

Sets the last error

setParams(self, params: Dict[str, Any])

Sets map of optional parameters