18#ifndef QGSPOINTCLOUDINDEX_H
19#define QGSPOINTCLOUDINDEX_H
36#include "qgspointcloudexpression.h"
73 return mD == other.
d() && mX == other.
x() && mY == other.
y() && mZ == other.
z();
86 QString toString()
const;
101 int mD = -1, mX = -1, mY = -1, mZ = -1;
130 QString
uri()
const {
return mUri; }
142 QgsPointCloudExpression mFilterExpression;
166 QList<QgsPointCloudNodeId> childIds,
float error,
QgsBox3D bounds )
167 : mId( id ), mPointCount( pointCount ), mChildIds( childIds ), mError( error ), mBounds( bounds )
175 QList<QgsPointCloudNodeId>
children()
const {
return mChildIds; }
188 QList<QgsPointCloudNodeId> mChildIds;
221 virtual std::unique_ptr<QgsPointCloudIndex>
clone()
const = 0;
224 virtual void load(
const QString &fileName ) = 0;
233 QString
error()
const {
return mError; }
294 double zMin()
const {
return mZMin; }
296 double zMax()
const {
return mZMax; }
318 bool setSubsetString(
const QString &subset );
326 QString subsetString()
const;
350 const QgsPointCloudExpression &expression,
const QString &uri );
357 double mZMin = 0, mZMax = 0;
371 static QCache<QgsPointCloudCacheKey, QgsPointCloudBlock>
sBlockCache;
A 3-dimensional box composed of x, y, z coordinates.
This class represents a coordinate reference system (CRS).
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.
QgsPointCloudExpression filterExpression() const
Returns the key's QgsPointCloudExpression.
QgsPointCloudCacheKey(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request, const QgsPointCloudExpression &expression, const QString &uri)
Ctor.
QgsPointCloudRequest request() const
Returns the key's QgsPointCloudRequest.
QgsPointCloudNodeId node() const
Returns the key's QgsPointCloudNodeId.
bool operator==(const QgsPointCloudCacheKey &other) const
QString uri() const
Returns the key's uri.
Represents a indexed point clouds data in octree.
double zMax() const
Returns z max.
QgsBox3D rootNodeBounds() const
Returns bounding box of root node in CRS coords.
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.
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.
virtual QgsPointCloudBlockRequest * asyncNodeData(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request)=0
Returns a handle responsible for loading a node data block.
QgsRectangle mExtent
2D extent of data
QgsPointCloudNodeId root()
Returns root node of the index.
QgsPointCloudAttributeCollection mAttributes
QHash< QgsPointCloudNodeId, int > mHierarchy
Data hierarchy.
QgsBox3D mRootBounds
Bounds of the root node's cube (in int32 coordinates)
QgsVector3D mOffset
Offset of our int32 coordinates compared to CRS coords.
virtual void load(const QString &fileName)=0
Loads the index from the file.
static QMutex sBlockCacheMutex
static QCache< QgsPointCloudCacheKey, QgsPointCloudBlock > sBlockCache
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.
virtual std::unique_ptr< QgsPointCloudBlock > nodeData(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request)=0
Returns node data block.
virtual ~QgsPointCloudIndex()
Represents a indexed point cloud node's position in octree.
bool isValid() const
Returns whether node is valid.
bool operator==(QgsPointCloudNodeId other) const
Keeps metadata for indexed point cloud node.
QList< QgsPointCloudNodeId > children() const
Returns IDs of child nodes.
qint64 pointCount() const
Returns number of points contained in node data.
QgsPointCloudNodeId id() const
Returns node's ID (unique in index)
static QgsBox3D bounds(QgsBox3D rootBounds, QgsPointCloudNodeId id)
Returns bounding box of specific node.
float error() const
Returns node's error in map units (used to determine in whether the node has enough detail for the cu...
QgsPointCloudNode(QgsPointCloudNodeId id, qint64 pointCount, QList< QgsPointCloudNodeId > childIds, float error, QgsBox3D bounds)
Constructs new node object.
QgsBox3D bounds() const
Returns node's bounding cube in CRS coords.
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(QgsPointCloudNodeId, Q_PRIMITIVE_TYPE)
CORE_EXPORT uint qHash(QgsPointCloudNodeId id)
Hash function for indexed nodes.