QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
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. More...
 
static QString combineFilters (const QStringList &filters)
 Combines a set of SensorThings API filter operators. More...
 
static QString displayString (Qgis::SensorThingsEntity type, bool plural=false)
 Converts a Qgis::SensorThingsEntity type to a user-friendly translated string. More...
 
static Qgis::SensorThingsEntity entitySetStringToEntity (const QString &type)
 Converts a string value corresponding to a SensorThings entity set to a Qgis::SensorThingsEntity type. More...
 
static bool entityTypeHasGeometry (Qgis::SensorThingsEntity type)
 Returns true if the specified entity type can have geometry attached. More...
 
static QgsFields fieldsForEntityType (Qgis::SensorThingsEntity type)
 Returns the fields which correspond to a specified entity type. More...
 
static QString filterForExtent (const QString &geometryField, const QgsRectangle &extent)
 Returns a filter string which restricts results to those within the specified extent. More...
 
static QString filterForWkbType (Qgis::SensorThingsEntity entityType, Qgis::WkbType wkbType)
 Returns a filter string which restricts results to those matching the specified entityType and wkbType. More...
 
static QString geometryFieldForEntityType (Qgis::SensorThingsEntity type)
 Returns the geometry field for a specified entity type. More...
 
static Qgis::SensorThingsEntity stringToEntity (const QString &type)
 Converts a string value to a Qgis::SensorThingsEntity type. More...
 

Static Public Attributes

static constexpr int DEFAULT_FEATURE_LIMIT = 10000
 Default limit on number of features fetched. More...
 
static constexpr int DEFAULT_PAGE_SIZE = 200
 Default page size. More...
 

Detailed Description

Utility functions for working with OGC SensorThings API services.

Since
QGIS 3.36

Definition at line 32 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 281 of file qgssensorthingsutils.cpp.

◆ combineFilters()

QString QgsSensorThingsUtils::combineFilters ( const QStringList &  filters)
static

Combines a set of SensorThings API filter operators.

See https://docs.ogc.org/is/18-088/18-088.html#requirement-request-data-filter

Since
QGIS 3.38

Definition at line 265 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 52 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 78 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 210 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 101 of file qgssensorthingsutils.cpp.

◆ filterForExtent()

QString QgsSensorThingsUtils::filterForExtent ( const QString &  geometryField,
const QgsRectangle extent 
)
static

Returns a filter string which restricts results to those within the specified extent.

The extent should always be specified in EPSG:4326.

Since
QGIS 3.38

Definition at line 257 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 230 of file qgssensorthingsutils.cpp.

◆ geometryFieldForEntityType()

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

Returns the geometry field for a specified entity type.

Definition at line 188 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 29 of file qgssensorthingsutils.cpp.

Member Data Documentation

◆ DEFAULT_FEATURE_LIMIT

constexpr int QgsSensorThingsUtils::DEFAULT_FEATURE_LIMIT = 10000
staticconstexpr

Default limit on number of features fetched.

Definition at line 41 of file qgssensorthingsutils.h.

◆ DEFAULT_PAGE_SIZE

constexpr int QgsSensorThingsUtils::DEFAULT_PAGE_SIZE = 200
staticconstexpr

Default page size.

Definition at line 38 of file qgssensorthingsutils.h.


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