Class: QgsSensorThingsUtils

class qgis.core.QgsSensorThingsUtils

Bases: sip.wrapper

Utility functions for working with OGC SensorThings API services.

New in version 3.36:

Methods

availableGeometryTypes

Returns a list of available geometry types for the server at the specified uri and entity type.

displayString

Converts a Qgis.SensorThingsEntity type to a user-friendly translated string.

entitySetStringToEntity

Converts a string value corresponding to a SensorThings entity set to a Qgis.SensorThingsEntity type.

entityTypeHasGeometry

Returns True if the specified entity type can have geometry attached.

fieldsForEntityType

Returns the fields which correspond to a specified entity type.

filterForWkbType

Returns a filter string which restricts results to those matching the specified entityType and wkbType.

geometryFieldForEntityType

Returns the geometry field for a specified entity type.

stringToEntity

Converts a string value to a Qgis.SensorThingsEntity type.

availableGeometryTypes(uri: str, type: Qgis.SensorThingsEntity, feedback: QgsFeedback = None, authCfg: str = '') List[Qgis.GeometryType]

Returns a list of available geometry types for the server at the specified uri and entity type.

This method will block while network requests are made to the server.

Parameters:
Return type:

List[Qgis.GeometryType]

displayString(type: Qgis.SensorThingsEntity, plural: bool = False) str

Converts a Qgis.SensorThingsEntity type to a user-friendly translated string.

If plural is True then a plural string is returned (ie “Things” instead of “Thing”).

Parameters:
Return type:

str

entitySetStringToEntity(type: str) Qgis.SensorThingsEntity

Converts a string value corresponding to a SensorThings entity set to a Qgis.SensorThingsEntity type.

Returns Qgis.SensorThingsEntity.Invalid if the string could not be converted to a known entity set type.

Parameters:

type (str) –

Return type:

Qgis.SensorThingsEntity

entityTypeHasGeometry(type: Qgis.SensorThingsEntity) bool

Returns True if the specified entity type can have geometry attached.

Parameters:

type (Qgis.SensorThingsEntity) –

Return type:

bool

fieldsForEntityType(type: Qgis.SensorThingsEntity) QgsFields

Returns the fields which correspond to a specified entity type.

Parameters:

type (Qgis.SensorThingsEntity) –

Return type:

QgsFields

filterForWkbType(entityType: Qgis.SensorThingsEntity, wkbType: Qgis.WkbType) str

Returns a filter string which restricts results to those matching the specified entityType and wkbType.

Parameters:
Return type:

str

geometryFieldForEntityType(type: Qgis.SensorThingsEntity) str

Returns the geometry field for a specified entity type.

Parameters:

type (Qgis.SensorThingsEntity) –

Return type:

str

stringToEntity(type: str) Qgis.SensorThingsEntity

Converts a string value to a Qgis.SensorThingsEntity type.

Returns Qgis.SensorThingsEntity.Invalid if the string could not be converted to a known entity type.

Parameters:

type (str) –

Return type:

Qgis.SensorThingsEntity