Class: QgsLayerMetadataProviderResult

class qgis.core.QgsLayerMetadataProviderResult

Bases: QgsLayerMetadata

Result record of layer metadata provider search. The result contains QGIS metadata information and all information that is required by QGIS to load the layer and to filter the results.

The class extends QgsLayerMetadata by adding information taken directly from the provider which is required for filtering (geographic extent) or because the actual values may be different by those stored in the metadata (CRS authid) or totally missing from the metadata (data provider name and layer type).

New in version 3.28.

QgsLayerMetadataProviderResult(metadata: QgsLayerMetadata) Constructor for QgsLayerMetadataProviderResult.

Parameters

metadata – layer metadata.

QgsLayerMetadataProviderResult() Default constructor.

QgsLayerMetadataProviderResult(QgsLayerMetadataProviderResult)

Methods

authid

Returns the layer CRS authid.

dataProviderName

Returns the data provider name.

equals

Tests whether the common metadata fields in this object are equal to other.

geographicExtent

Returns the layer extent in EPSG:4326

geometryType

Returns the layer geometry type.

layerType

Returns the layer type.

setAuthid

Sets the layer authid.

setDataProviderName

Sets the data provider name to dataProviderName.

setGeographicExtent

Sets the layer extent in EPSG:4326 to geographicExtent

setGeometryType

Sets the layer geometry type to geometryType.

setLayerType

Sets the layer type to layerType.

setStandardUri

Sets the metadata standard URI to standardUri.

setUri

Sets the layer data source URI to Uri.

standardUri

Returns the metadata standard URI (usually "http://mrcc.com/qgis.dtd")

uri

Returns the layer data source URI.

authid(self) str

Returns the layer CRS authid.

Return type

str

dataProviderName(self) str

Returns the data provider name.

Return type

str

equals(self, other: QgsAbstractMetadataBase) bool

Tests whether the common metadata fields in this object are equal to other.

Subclasses should utilize this method from their equality operators to test equality of base class members.

New in version 3.2.

geographicExtent(self) QgsPolygon

Returns the layer extent in EPSG:4326

Return type

QgsPolygon

geometryType(self) QgsWkbTypes.GeometryType

Returns the layer geometry type.

Return type

QgsWkbTypes.GeometryType

layerType(self) QgsMapLayerType

Returns the layer type.

Return type

QgsMapLayerType

setAuthid(self, authid: str)

Sets the layer authid.

Parameters

authid (str) –

setDataProviderName(self, dataProviderName: str)

Sets the data provider name to dataProviderName.

Parameters

dataProviderName (str) –

setGeographicExtent(self, geographicExtent: QgsPolygon)

Sets the layer extent in EPSG:4326 to geographicExtent

Parameters

geographicExtent (QgsPolygon) –

setGeometryType(self, geometryType: QgsWkbTypes.GeometryType)

Sets the layer geometry type to geometryType.

Parameters

geometryType (QgsWkbTypes.GeometryType) –

setLayerType(self, layerType: QgsMapLayerType)

Sets the layer type to layerType.

Parameters

layerType (QgsMapLayerType) –

setStandardUri(self, standardUri: str)

Sets the metadata standard URI to standardUri.

Parameters

standardUri (str) –

setUri(self, Uri: str)

Sets the layer data source URI to Uri.

Parameters

Uri (str) –

standardUri(self) str

Returns the metadata standard URI (usually “http://mrcc.com/qgis.dtd”)

Return type

str

uri(self) str

Returns the layer data source URI.

Return type

str