QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
qgssensorthingsutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssensorthingsutils.h
3 --------------------
4 begin : November 2023
5 copyright : (C) 2023 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSSENSORTHINGSUTILS_H
16#define QGSSENSORTHINGSUTILS_H
17
18#include "qgis_sip.h"
19#include "qgis_core.h"
20#include "qgis.h"
21
22class QgsFields;
23class QgsFeedback;
24class QgsRectangle;
25
32class CORE_EXPORT QgsSensorThingsUtils
33{
34
35 public:
36
38 static constexpr int DEFAULT_PAGE_SIZE = 200; SIP_SKIP
39
41 static constexpr int DEFAULT_FEATURE_LIMIT = 10000; SIP_SKIP
42
48 static Qgis::SensorThingsEntity stringToEntity( const QString &type );
49
55 static QString displayString( Qgis::SensorThingsEntity type, bool plural = false );
56
62 static Qgis::SensorThingsEntity entitySetStringToEntity( const QString &type );
63
67 static QgsFields fieldsForEntityType( Qgis::SensorThingsEntity type );
68
72 static QString geometryFieldForEntityType( Qgis::SensorThingsEntity type );
73
77 static bool entityTypeHasGeometry( Qgis::SensorThingsEntity type );
78
83 static QString filterForWkbType( Qgis::SensorThingsEntity entityType, Qgis::WkbType wkbType );
84
93 static QString filterForExtent( const QString &geometryField, const QgsRectangle &extent );
94
102 static QString combineFilters( const QStringList &filters );
103
110 static QList< Qgis::GeometryType > availableGeometryTypes( const QString &uri, Qgis::SensorThingsEntity type, QgsFeedback *feedback = nullptr, const QString &authCfg = QString() );
111
112};
113
114#endif // QGSSENSORTHINGSUTILS_H
SensorThingsEntity
OGC SensorThings API entity types.
Definition: qgis.h:4865
WkbType
The WKB type describes the number of dimensions a geometry has.
Definition: qgis.h:182
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:44
Container of fields for a vector layer.
Definition: qgsfields.h:45
A rectangle specified with double values.
Definition: qgsrectangle.h:42
Utility functions for working with OGC SensorThings API services.
#define SIP_SKIP
Definition: qgis_sip.h:126