Class: QgsRasterIdentifyResult

class qgis.core.QgsRasterIdentifyResult

Bases: sip.wrapper

Raster identify results container.

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

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

error(self)QgsError

Returns the last error

Return type

QgsError

format(self)QgsRaster.IdentifyFormat

Returns the results format.

Return type

QgsRaster.IdentifyFormat

isValid(self)bool

Returns True if valid

Return type

bool

params(self)Dict[str, Any]

Gets map of optional parameters

Return type

Dict[str, Any]

results(self)Dict[int, Any]

Returns the identify results. Results are different for each format:

  • QgsRaster.IdentifyFormatValue: a map of values for each band, where keys are band numbers (from 1).

  • QgsRaster.IdentifyFormatFeature: a map of WMS sublayer keys and lists of QgsFeatureStore values.

  • QgsRaster.IdentifyFormatHtml: a map of WMS sublayer keys and HTML strings.

Return type

Dict[int, Any]

setError(self, error: QgsError)

Sets the last error

Parameters

error (QgsError) –

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

Sets map of optional parameters

Parameters

params (Dict[str) –