|
QGIS API Documentation 4.1.0-Master (3fcefe620d1)
|
Utility functions for working with OGC SensorThings API services. More...
#include <qgssensorthingsutils.h>
Classes | |
| struct | ServiceCapabilities |
| SensorThings service capabilities. More... | |
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 ServiceCapabilities | determineServiceCapabilities (const QString &uri, QgsFeedback *feedback=nullptr, const QString &authCfg=QString()) |
| Retrieves general service capabilities for a SensorThings server. | |
| 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, bool includeRangeFieldProxies=true) |
| 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 37 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 2324 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 1235 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 1126 of file qgssensorthingsutils.cpp.
|
static |
Retrieves general service capabilities for a SensorThings server.
Definition at line 1142 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 330 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 386 of file qgssensorthingsutils.cpp.
|
static |
Converts a SensorThings entity set to a SensorThings entity set string.
Definition at line 439 of file qgssensorthingsutils.cpp.
|
static |
Returns true if the specified entity type can have geometry attached.
Definition at line 1023 of file qgssensorthingsutils.cpp.
|
static |
Returns a list of permissible expand targets for a given base entity type.
Definition at line 1362 of file qgssensorthingsutils.cpp.
|
static |
Returns the fields which correspond to a specified entity type.
Since QGIS 3.42 the includeRangeFieldProxies argument can be used to hide the "start"/"end" fields which are proxies for the date time range field types which are not natively supported in QGIS.
Definition at line 732 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 961 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 1120 of file qgssensorthingsutils.cpp.
|
static |
Returns a filter string which restricts results to those matching the specified entityType and wkbType.
Definition at line 1093 of file qgssensorthingsutils.cpp.
|
static |
Returns the geometry field for a specified entity type.
Definition at line 982 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 1058 of file qgssensorthingsutils.cpp.
|
static |
Returns the SensorThings properties which correspond to a specified entity type.
Definition at line 495 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 1456 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 277 of file qgssensorthingsutils.cpp.
|
staticconstexpr |
Default limit on number of expanded features fetched.
Definition at line 47 of file qgssensorthingsutils.h.
|
staticconstexpr |
Default limit on number of features fetched.
Definition at line 44 of file qgssensorthingsutils.h.
|
staticconstexpr |
Default page size.
Definition at line 41 of file qgssensorthingsutils.h.