18#ifndef QGSPOINTCLOUDINDEX_H
19#define QGSPOINTCLOUDINDEX_H
37#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;
151 qint32 mXMin, mYMin, mZMin, mXMax, mYMax, mZMax;
183 virtual std::unique_ptr<QgsPointCloudIndex>
clone()
const = 0;
186 virtual void load(
const QString &fileName ) = 0;
195 QString
error()
const {
return mError; }
214 virtual QVariantList metadataClasses(
const QString &attribute )
const;
269 double zMin()
const {
return mZMin; }
271 double zMax()
const {
return mZMax; }
315 bool setSubsetString(
const QString &subset );
323 QString subsetString()
const;
336 double mZMin = 0, mZMax = 0;
Represents a indexed point cloud node in octree.
bool isValid() const
Returns whether node is valid.
bool operator==(IndexedPointCloudNode other) const
Compares nodes.
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.
Represents packaged data bounds.
qint32 xMax() const
Returns x max.
QgsPointCloudDataBounds(qint32 xmin, qint32 ymin, qint32 zmin, qint32 xmax, qint32 ymax, qint32 zmax)
Constructs bounds.
qint32 xMin() const
Returns x min.
qint32 yMax() const
Returns y max.
QgsDoubleRange zRange(const QgsVector3D &offset, const QgsVector3D &scale) const
Returns the z range, applying the specified offset and scale.
QgsPointCloudDataBounds()
Constructs invalid bounds.
qint32 zMax() const
Returns z max.
QgsRectangle mapExtent(const QgsVector3D &offset, const QgsVector3D &scale) const
Returns 2D rectangle in map coordinates.
qint32 yMin() const
Returns y min.
qint32 zMin() const
Returns z 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 QgsPointCloudBlock * nodeData(const IndexedPointCloudNode &n, const QgsPointCloudRequest &request)=0
Returns node data block.
virtual void load(const QString &fileName)=0
Loads the index from the file.
IndexedPointCloudNode root()
Returns root node of the index.
virtual bool hasStatisticsMetadata() const =0
Returns whether the dataset contains metadata of statistics.
int mSpan
All native attributes stored in the file.
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.
Statistic
Enumeration of flags that specify statistics to be calculated.
Q_DECLARE_TYPEINFO(IndexedPointCloudNode, Q_PRIMITIVE_TYPE)
CORE_EXPORT uint qHash(IndexedPointCloudNode id)
Hash function for indexed nodes.