Class: QgsRasterIdentifyResult

class qgis.core.QgsRasterIdentifyResult

Bases: sip.wrapper

Constructor for QgsRasterIdentifyResult.

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

  • format – the result format
  • results – the results

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

Parameters:error – the error


Raster identify results container.



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



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