Class: QgsSensorThingsUtils¶
- class qgis.core.QgsSensorThingsUtils¶
Bases:
sip.wrapper
Utility functions for working with OGC SensorThings API services.
Added in version 3.36:
Methods
Returns a list of available geometry types for the server at the specified
uri
and entitytype
.Combines a set of SensorThings API filter operators.
Converts a
Qgis
.SensorThingsEntitytype
to a user-friendly translated string.Converts a string value corresponding to a SensorThings entity set to a
Qgis
.SensorThingsEntity type.Returns
True
if the specified entitytype
can have geometry attached.Returns the fields which correspond to a specified entity
type
.Returns a filter string which restricts results to those within the specified
extent
.Returns a filter string which restricts results to those matching the specified
entityType
andwkbType
.Returns the geometry field for a specified entity
type
.Returns the geometry type for if the specified entity
type
.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 entitytype
.This method will block while network requests are made to the server.
- Parameters:
uri (str)
type (Qgis.SensorThingsEntity)
feedback (
QgsFeedback
= None)authCfg (str = '')
- Return type:
List[Qgis.GeometryType]
- combineFilters(filters: Iterable[str]) str ¶
Combines a set of SensorThings API filter operators.
See https://docs.ogc.org/is/18-088/18-088.html#requirement-request-data-filter
Added in version 3.38.
- Parameters:
filters (Iterable[str])
- Return type:
str
- displayString(type: Qgis.SensorThingsEntity, plural: bool = False) str ¶
Converts a
Qgis
.SensorThingsEntitytype
to a user-friendly translated string.If
plural
isTrue
then a plural string is returned (ie “Things” instead of “Thing”).- Parameters:
type (Qgis.SensorThingsEntity)
plural (bool = False)
- 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:
- entityTypeHasGeometry(type: Qgis.SensorThingsEntity) bool ¶
Returns
True
if the specified entitytype
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:
- filterForExtent(geometryField: str, extent: QgsRectangle) str ¶
Returns a filter string which restricts results to those within the specified
extent
.The
extent
should always be specified in EPSG:4326.Added in version 3.38.
- Parameters:
geometryField (str)
extent (QgsRectangle)
- Return type:
str
- filterForWkbType(entityType: Qgis.SensorThingsEntity, wkbType: Qgis.WkbType) str ¶
Returns a filter string which restricts results to those matching the specified
entityType
andwkbType
.- Parameters:
entityType (Qgis.SensorThingsEntity)
wkbType (Qgis.WkbType)
- Return type:
str
- geometryFieldForEntityType(type: Qgis.SensorThingsEntity) str ¶
Returns the geometry field for a specified entity
type
.- Parameters:
type (Qgis.SensorThingsEntity)
- Return type:
str
- geometryTypeForEntity(type: Qgis.SensorThingsEntity) Qgis.GeometryType ¶
Returns the geometry type for if the specified entity
type
.If there are no restrictions on the geometry type an ntity can have
Qgis
.GeometryType.Unknown will be returned.Added in version 3.38.
- Parameters:
type (Qgis.SensorThingsEntity)
- Return type:
- 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: