16#ifndef QGSSENSORTHINGSSHAREDDATA_H
17#define QGSSENSORTHINGSSHAREDDATA_H
26#include <QReadWriteLock>
36class QgsSensorThingsSharedData
40 QgsSensorThingsSharedData(
const QString &uri );
45 static QUrl parseUrl(
const QUrl &url,
bool *isTestEndpoint =
nullptr );
50 QString error()
const {
return mError; }
54 long long featureCount(
QgsFeedback *feedback =
nullptr )
const;
55 QString subsetString()
const;
57 bool hasCachedAllFeatures()
const;
66 bool processFeatureRequest( QString &nextPage,
QgsFeedback *feedback,
67 const std::function<
void(
const QgsFeature & ) > &fetchedFeatureCallback,
68 const std::function<
bool() > &continueFetchingCallback,
69 const std::function<
void() > &onNoMoreFeaturesCallback );
71 friend class QgsSensorThingsProvider;
72 mutable QReadWriteLock mReadWriteLock{ QReadWriteLock::Recursive };
78 mutable QString mError;
80 QString mEntityBaseUri;
81 QString mSubsetString;
82 QString mExpandQueryString;
85 QList< QgsSensorThingsExpansionDefinition > mExpansions;
87 int mFeatureLimit = 0;
89 QString mGeometryField;
100 mutable long long mRetrievedBaseFeatureCount = 0;
102 QHash<QString, QgsFeatureId> mIotIdToFeatureId;
103 QMap<QgsFeatureId, QgsFeature> mCachedFeatures;
107 bool mHasCachedAllFeatures =
false;
112 mutable QString mNextPage;
SensorThingsEntity
OGC SensorThings API entity types.
@ Invalid
An invalid/unknown entity.
WkbType
The WKB type describes the number of dimensions a geometry has.
This class represents a coordinate reference system (CRS).
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Container of fields for a vector layer.
A geometry is the spatial representation of a feature.
A rectangle specified with double values.
static constexpr int DEFAULT_PAGE_SIZE
Default page size.
A spatial index for QgsFeature objects.
@ Uncounted
Feature count not yet computed.
QSet< QgsFeatureId > QgsFeatureIds
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
const QgsCoordinateReferenceSystem & crs