18#ifndef QGSPOINTCLOUDINDEX_H
19#define QGSPOINTCLOUDINDEX_H
37#include "qgspointcloudexpression.h"
74 return mD == other.
d() && mX == other.
x() && mY == other.
y() && mZ == other.
z();
87 QString toString()
const;
102 int mD = -1, mX = -1, mY = -1, mZ = -1;
132 QString
uri()
const {
return mUri; }
144 QgsPointCloudExpression mFilterExpression;
229 virtual std::unique_ptr<QgsPointCloudIndex>
clone()
const = 0;
232 virtual void load(
const QString &fileName ) = 0;
241 QString
error()
const {
return mError; }
258 virtual QVariant metadataStatistic(
const QString &attribute,
Qgis::Statistic statistic )
const;
260 virtual QVariantList metadataClasses(
const QString &attribute )
const;
262 virtual QVariant metadataClassStatistic(
const QString &attribute,
const QVariant &value,
Qgis::Statistic statistic )
const;
313 double zMin()
const {
return mZMin; }
315 double zMax()
const {
return mZMax; }
359 bool setSubsetString(
const QString &subset );
367 QString subsetString()
const;
391 const QgsPointCloudExpression &expression,
const QString &uri );
398 double mZMin = 0, mZMax = 0;
412 static QCache<QgsPointCloudCacheKey, QgsPointCloudBlock>
sBlockCache;
Represents a indexed point cloud node in octree.
bool isValid() const
Returns whether node is valid.
bool operator==(IndexedPointCloudNode other) const
Compares nodes.
Statistic
Available generic statistics.
This class represents a coordinate reference system (CRS).
QgsRange which stores a range of double values.
Collection of point cloud attributes.
Base class for handling loading QgsPointCloudBlock asynchronously.
Base class for storing raw data from point cloud nodes.
Container class for QgsPointCloudBlock cache keys.
IndexedPointCloudNode node() const
Returns the key's IndexedPointCloudNode.
QgsPointCloudExpression filterExpression() const
Returns the key's QgsPointCloudExpression.
QgsPointCloudRequest request() const
Returns the key's QgsPointCloudRequest.
QgsPointCloudCacheKey(const IndexedPointCloudNode &n, const QgsPointCloudRequest &request, const QgsPointCloudExpression &expression, const QString &uri)
Ctor.
bool operator==(const QgsPointCloudCacheKey &other) const
Compares keys.
QString uri() const
Returns the key's uri.
Represents packaged data bounds.
qint64 xMin() const
Returns x min.
qint64 zMin() const
Returns z min.
qint64 yMax() const
Returns y max.
qint64 xMax() const
Returns x max.
QgsPointCloudDataBounds(qint64 xmin, qint64 ymin, qint64 zmin, qint64 xmax, qint64 ymax, qint64 zmax)
Constructs bounds.
QgsDoubleRange zRange(const QgsVector3D &offset, const QgsVector3D &scale) const
Returns the z range, applying the specified offset and scale.
QgsPointCloudDataBounds()
Constructs invalid bounds.
QgsRectangle mapExtent(const QgsVector3D &offset, const QgsVector3D &scale) const
Returns 2D rectangle in map coordinates.
qint64 zMax() const
Returns z max.
qint64 yMin() const
Returns y min.
Represents a indexed point clouds data in octree.
double zMax() const
Returns z max.
virtual QgsPointCloudBlockRequest * asyncNodeData(const IndexedPointCloudNode &n, const QgsPointCloudRequest &request)=0
Returns a handle responsible for loading a node data block.
QgsPointCloudIndex()
Constructs index.
QString error() const
Returns the error that occurred during the loading of the index.
double zMin() const
Returns z min.
AccessType
The access type of the data, local is for local files and remote for remote files (over HTTP)
@ Local
Local means the source is a local file on the machine.
virtual qint64 pointCount() const =0
Returns the number of points in the point cloud.
virtual AccessType accessType() const =0
Returns the access type of the data If the access type is Remote, data will be fetched from an HTTP s...
virtual std::unique_ptr< QgsPointCloudIndex > clone() const =0
Returns a clone of the current point cloud index object.
QHash< IndexedPointCloudNode, int > mHierarchy
Data hierarchy.
virtual bool isValid() const =0
Returns whether index is loaded and valid.
QgsRectangle extent() const
Returns extent of the data.
virtual QgsCoordinateReferenceSystem crs() const =0
Returns the coordinate reference system of the point cloud index.
QgsPointCloudDataBounds mRootBounds
Bounds of the root node's cube (in int32 coordinates)
QgsRectangle mExtent
2D extent of data
QgsPointCloudAttributeCollection mAttributes
QgsVector3D mOffset
Offset of our int32 coordinates compared to CRS coords.
virtual void load(const QString &fileName)=0
Loads the index from the file.
IndexedPointCloudNode root()
Returns root node of the index.
static QMutex sBlockCacheMutex
virtual bool hasStatisticsMetadata() const =0
Returns whether the dataset contains metadata of statistics.
static QCache< QgsPointCloudCacheKey, QgsPointCloudBlock > sBlockCache
virtual std::unique_ptr< QgsPointCloudBlock > nodeData(const IndexedPointCloudNode &n, const QgsPointCloudRequest &request)=0
Returns node data block.
QgsVector3D mScale
Scale of our int32 coordinates compared to CRS coords.
virtual QVariantMap originalMetadata() const =0
Returns the original metadata map.
QgsPointCloudExpression mFilterExpression
The filter expression to be evaluated when fetching node data.
Point cloud data request.
Class used to store statistics of a point cloud dataset.
A rectangle specified with double values.
Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precisi...
Q_DECLARE_TYPEINFO(IndexedPointCloudNode, Q_PRIMITIVE_TYPE)
CORE_EXPORT uint qHash(IndexedPointCloudNode id)
Hash function for indexed nodes.