QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
QgsSensorThingsUtils Class Reference

Utility functions for working with OGC SensorThings API services. More...

#include <qgssensorthingsutils.h>

Static Public Member Functions

static QList< Qgis::GeometryTypeavailableGeometryTypes (const QString &uri, Qgis::SensorThingsEntity type, QgsFeedback *feedback=nullptr, const QString &authCfg=QString())
 Returns a list of available geometry types for the server at the specified uri and entity type.
 
static QString displayString (Qgis::SensorThingsEntity type, bool plural=false)
 Converts a Qgis::SensorThingsEntity type to a user-friendly translated string.
 
static Qgis::SensorThingsEntity entitySetStringToEntity (const QString &type)
 Converts a string value corresponding to a SensorThings entity set to a Qgis::SensorThingsEntity type.
 
static bool entityTypeHasGeometry (Qgis::SensorThingsEntity type)
 Returns true if the specified entity type can have geometry attached.
 
static QgsFields fieldsForEntityType (Qgis::SensorThingsEntity type)
 Returns the fields which correspond to a specified entity type.
 
static QString filterForWkbType (Qgis::SensorThingsEntity entityType, Qgis::WkbType wkbType)
 Returns a filter string which restricts results to those matching the specified entityType and wkbType.
 
static QString geometryFieldForEntityType (Qgis::SensorThingsEntity type)
 Returns the geometry field for a specified entity type.
 
static Qgis::SensorThingsEntity stringToEntity (const QString &type)
 Converts a string value to a Qgis::SensorThingsEntity type.
 

Static Public Attributes

static constexpr int DEFAULT_PAGE_SIZE = 200
 Default page size.
 

Detailed Description

Utility functions for working with OGC SensorThings API services.

Since
QGIS 3.36

Definition at line 31 of file qgssensorthingsutils.h.

Member Function Documentation

◆ availableGeometryTypes()

QList< Qgis::GeometryType > QgsSensorThingsUtils::availableGeometryTypes ( const QString &  uri,
Qgis::SensorThingsEntity  type,
QgsFeedback feedback = nullptr,
const QString &  authCfg = QString() 
)
static

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.

Definition at line 267 of file qgssensorthingsutils.cpp.

◆ displayString()

QString QgsSensorThingsUtils::displayString ( Qgis::SensorThingsEntity  type,
bool  plural = false 
)
static

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

Definition at line 50 of file qgssensorthingsutils.cpp.

◆ entitySetStringToEntity()

Qgis::SensorThingsEntity QgsSensorThingsUtils::entitySetStringToEntity ( const QString &  type)
static

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.

Definition at line 76 of file qgssensorthingsutils.cpp.

◆ entityTypeHasGeometry()

bool QgsSensorThingsUtils::entityTypeHasGeometry ( Qgis::SensorThingsEntity  type)
static

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

Definition at line 208 of file qgssensorthingsutils.cpp.

◆ fieldsForEntityType()

QgsFields QgsSensorThingsUtils::fieldsForEntityType ( Qgis::SensorThingsEntity  type)
static

Returns the fields which correspond to a specified entity type.

Definition at line 99 of file qgssensorthingsutils.cpp.

◆ filterForWkbType()

QString QgsSensorThingsUtils::filterForWkbType ( Qgis::SensorThingsEntity  entityType,
Qgis::WkbType  wkbType 
)
static

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

Definition at line 228 of file qgssensorthingsutils.cpp.

◆ geometryFieldForEntityType()

QString QgsSensorThingsUtils::geometryFieldForEntityType ( Qgis::SensorThingsEntity  type)
static

Returns the geometry field for a specified entity type.

Definition at line 186 of file qgssensorthingsutils.cpp.

◆ stringToEntity()

Qgis::SensorThingsEntity QgsSensorThingsUtils::stringToEntity ( const QString &  type)
static

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.

Definition at line 27 of file qgssensorthingsutils.cpp.

Member Data Documentation

◆ DEFAULT_PAGE_SIZE

constexpr int QgsSensorThingsUtils::DEFAULT_PAGE_SIZE = 200
staticconstexpr

Default page size.

Definition at line 37 of file qgssensorthingsutils.h.


The documentation for this class was generated from the following files: