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; }
53 long long featureCount(
QgsFeedback *feedback =
nullptr )
const;
55 bool hasCachedAllFeatures()
const;
64 bool processFeatureRequest( QString &nextPage,
QgsFeedback *feedback,
65 const std::function<
void(
const QgsFeature & ) > &fetchedFeatureCallback,
66 const std::function<
bool() > &continueFetchingCallback,
67 const std::function<
void() > &onNoMoreFeaturesCallback );
69 friend class QgsSensorThingsProvider;
70 mutable QReadWriteLock mReadWriteLock{ QReadWriteLock::Recursive };
76 mutable QString mError;
78 QString mEntityBaseUri;
83 QString mGeometryField;
89 QHash<QString, QgsFeatureId> mIotIdToFeatureId;
90 QMap<QgsFeatureId, QgsFeature> mCachedFeatures;
94 bool mHasCachedAllFeatures =
false;
99 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