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

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: 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).

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