QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Utility functions for working with OGC SensorThings API services. More...
#include <qgssensorthingsutils.h>
Static Public Member Functions | |
static QString | asQueryString (Qgis::SensorThingsEntity baseType, const QList< QgsSensorThingsExpansionDefinition > &expansions) |
Returns a list of expansions as a valid SensorThings API query string, eg "$expand=Locations($orderby=id desc;$top=3;$expand=Datastreams($top=101))". | |
static QList< Qgis::GeometryType > | availableGeometryTypes (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 | combineFilters (const QStringList &filters) |
Combines a set of SensorThings API filter operators. | |
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 QString | entityToSetString (Qgis::SensorThingsEntity type) |
Converts a SensorThings entity set to a SensorThings entity set string. | |
static bool | entityTypeHasGeometry (Qgis::SensorThingsEntity type) |
Returns true if the specified entity type can have geometry attached. | |
static QList< Qgis::SensorThingsEntity > | expandableTargets (Qgis::SensorThingsEntity type) |
Returns a list of permissible expand targets for a given base entity type. | |
static QgsFields | fieldsForEntityType (Qgis::SensorThingsEntity type) |
Returns the fields which correspond to a specified entity type. | |
static QgsFields | fieldsForExpandedEntityType (Qgis::SensorThingsEntity baseType, const QList< Qgis::SensorThingsEntity > &expandedTypes) |
Returns the fields which correspond to a specified entity baseType, expanded using the specified list of expandedTypes. | |
static QString | filterForExtent (const QString &geometryField, const QgsRectangle &extent) |
Returns a filter string which restricts results to those within the specified extent. | |
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::GeometryType | geometryTypeForEntity (Qgis::SensorThingsEntity type) |
Returns the geometry type for if the specified entity type. | |
static QStringList | propertiesForEntityType (Qgis::SensorThingsEntity type) |
Returns the SensorThings properties which correspond to a specified entity type. | |
static Qgis::RelationshipCardinality | relationshipCardinality (Qgis::SensorThingsEntity baseType, Qgis::SensorThingsEntity relatedType, bool &valid) |
Returns the cardinality of the relationship between a base entity type and a related 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_EXPANSION_LIMIT = 100 |
Default limit on number of expanded features fetched. | |
static constexpr int | DEFAULT_FEATURE_LIMIT = 10000 |
Default limit on number of features fetched. | |
static constexpr int | DEFAULT_PAGE_SIZE = 200 |
Default page size. | |
Utility functions for working with OGC SensorThings API services.
Definition at line 33 of file qgssensorthingsutils.h.
|
static |
Returns a list of expansions as a valid SensorThings API query string, eg "$expand=Locations($orderby=id desc;$top=3;$expand=Datastreams($top=101))".
The base entity type for the query must be specified.
Definition at line 1150 of file qgssensorthingsutils.cpp.
|
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 723 of file qgssensorthingsutils.cpp.
|
static |
Combines a set of SensorThings API filter operators.
See https://docs.ogc.org/is/18-088/18-088.html#requirement-request-data-filter
Definition at line 707 of file qgssensorthingsutils.cpp.
|
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 296 of file qgssensorthingsutils.cpp.
|
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 324 of file qgssensorthingsutils.cpp.
|
static |
Converts a SensorThings entity set to a SensorThings entity set string.
Definition at line 349 of file qgssensorthingsutils.cpp.
|
static |
Returns true
if the specified entity type can have geometry attached.
Definition at line 628 of file qgssensorthingsutils.cpp.
|
static |
Returns a list of permissible expand targets for a given base entity type.
Definition at line 852 of file qgssensorthingsutils.cpp.
|
static |
Returns the fields which correspond to a specified entity type.
Definition at line 481 of file qgssensorthingsutils.cpp.
|
static |
Returns the fields which correspond to a specified entity baseType, expanded using the specified list of expandedTypes.
Definition at line 582 of file qgssensorthingsutils.cpp.
|
static |
Returns a filter string which restricts results to those within the specified extent.
The extent should always be specified in EPSG:4326.
Definition at line 699 of file qgssensorthingsutils.cpp.
|
static |
Returns a filter string which restricts results to those matching the specified entityType and wkbType.
Definition at line 672 of file qgssensorthingsutils.cpp.
|
static |
Returns the geometry field for a specified entity type.
Definition at line 603 of file qgssensorthingsutils.cpp.
|
static |
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.
Definition at line 649 of file qgssensorthingsutils.cpp.
|
static |
Returns the SensorThings properties which correspond to a specified entity type.
Definition at line 377 of file qgssensorthingsutils.cpp.
|
static |
Returns the cardinality of the relationship between a base entity type and a related entity type.
baseType | base entity type |
relatedType | related entity type |
valid | will be set to true if a relationship exists between the entity types, or false if no relationship exists |
Definition at line 929 of file qgssensorthingsutils.cpp.
|
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 271 of file qgssensorthingsutils.cpp.
|
staticconstexpr |
Default limit on number of expanded features fetched.
Definition at line 45 of file qgssensorthingsutils.h.
|
staticconstexpr |
Default limit on number of features fetched.
Definition at line 42 of file qgssensorthingsutils.h.
|
staticconstexpr |
Default page size.
Definition at line 39 of file qgssensorthingsutils.h.