18#ifndef QGSPOINTCLOUDINDEX_H 
   19#define QGSPOINTCLOUDINDEX_H 
   37#include "qgspointcloudexpression.h" 
   71      return mD == other.
d() && mX == other.
x() && mY == other.
y() && mZ == other.
z();
 
 
   84    QString toString() 
const;
 
   99    int mD = -1, mX = -1, mY = -1, mZ = -1;
 
 
  130    QString 
uri()
 const { 
return mUri; }
 
  142    QString mSubsetString;
 
 
  169                       const QList<QgsPointCloudNodeId> &childIds,
 
  173      , mPointCount( pointCount )
 
  174      , mChildIds( childIds )
 
 
  184    QList<QgsPointCloudNodeId> 
children()
 const { 
return mChildIds; }
 
  197    QList<QgsPointCloudNodeId> mChildIds;
 
 
  222    virtual void load( 
const QString &fileName ) = 0;
 
  231    QString 
error()
 const { 
return mError; }
 
  302    virtual bool updateNodeData( 
const QHash<QgsPointCloudNodeId, QByteArray> &data );
 
  308    double zMin()
 const { 
return mZMin; }
 
  310    double zMax()
 const { 
return mZMax; }
 
  332    virtual bool setSubsetString( 
const QString &subset );
 
  340    virtual QString subsetString() 
const;
 
  364                                            const QgsPointCloudExpression &expression, 
const QString &uri );
 
  372    virtual QVariantMap extraMetadata() 
const;
 
  379    double mZMin = 0, mZMax = 0;   
 
  393    static QCache<QgsPointCloudCacheKey, QgsPointCloudBlock> 
sBlockCache;
 
 
  416    operator bool() 
const;
 
  426    void load( 
const QString &fileName );
 
  433    bool isValid() 
const;
 
  440    QString error() 
const;
 
  464    qint64 pointCount() 
const;
 
  471    QVariantMap originalMetadata() 
const;
 
  547    bool updateNodeData( 
const QHash<QgsPointCloudNodeId, QByteArray> &data );
 
  605    bool setSubsetString( 
const QString &subset );
 
  613    QString subsetString() 
const;
 
  637    QVariantMap extraMetadata() 
const;
 
  645    bool commitChanges( QString *errorMessage 
SIP_OUT = 
nullptr );
 
  648    bool isModified() 
const;
 
  651    QList<QgsPointCloudNodeId> updatedNodes() 
const;
 
  654    std::shared_ptr<QgsAbstractPointCloudIndex> mIndex;
 
  656    friend class TestQgsPointCloudEditing;
 
 
PointCloudAccessType
The access type of the data, local is for local files and remote for remote files (over HTTP).
 
Represents an indexed point clouds data in octree.
 
virtual ~QgsAbstractPointCloudIndex()
 
virtual QVariantMap originalMetadata() const =0
Returns the original metadata map.
 
virtual qint64 pointCount() const =0
Returns the number of points in the point cloud.
 
QgsPointCloudAttributeCollection mAttributes
 
QHash< QgsPointCloudNodeId, int > mHierarchy
Data hierarchy.
 
QgsBox3D rootNodeBounds() const
Returns bounding box of root node in CRS coords.
 
virtual QgsCoordinateReferenceSystem crs() const =0
Returns the coordinate reference system of the point cloud index.
 
QgsRectangle extent() const
Returns extent of the data.
 
QgsBox3D mRootBounds
Bounds of the root node's cube (in int32 coordinates)
 
static QMutex sBlockCacheMutex
 
QgsVector3D mOffset
Offset of our int32 coordinates compared to CRS coords.
 
QgsPointCloudExpression mFilterExpression
The filter expression to be evaluated when fetching node data.
 
virtual void load(const QString &fileName)=0
Loads the index from the file.
 
virtual QgsPointCloudBlockRequest * asyncNodeData(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request)=0
Returns a handle responsible for loading a node data block.
 
virtual Qgis::PointCloudAccessType accessType() const =0
Returns the access type of the data If the access type is Remote, data will be fetched from an HTTP s...
 
static QCache< QgsPointCloudCacheKey, QgsPointCloudBlock > sBlockCache
 
QgsRectangle mExtent
2D extent of data
 
QString error() const
Returns the error that occurred during the loading of the index.
 
QgsPointCloudNodeId root() const
Returns root node of the index.
 
QgsVector3D mScale
Scale of our int32 coordinates compared to CRS coords.
 
virtual std::unique_ptr< QgsPointCloudBlock > nodeData(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request)=0
Returns node data block.
 
QgsAbstractPointCloudIndex()
Constructs index.
 
double zMax() const
Returns z max.
 
virtual bool isValid() const =0
Returns whether index is loaded and valid.
 
double zMin() const
Returns z min.
 
A 3-dimensional box composed of x, y, z coordinates.
 
Represents a coordinate reference system (CRS).
 
A 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.
 
QString subsetString() const
Returns the key's subset string. This is used in the point cloud index as a filter expression.
 
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.
 
QgsPointCloudCacheKey(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request, const QString &subset, const QString &uri)
Ctor.
 
Smart pointer for QgsAbstractPointCloudIndex.
 
QgsAbstractPointCloudIndex * get()
Returns pointer to the implementation class.
 
Represents an indexed point cloud node's position in octree.
 
bool isValid() const
Returns whether node is valid.
 
bool operator==(QgsPointCloudNodeId other) const
 
Keeps metadata for an 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(const QgsPointCloudNodeId &id, qint64 pointCount, const QList< QgsPointCloudNodeId > &childIds, float error, const QgsBox3D &bounds)
Constructs new node object.
 
QgsBox3D bounds() const
Returns node's bounding cube in CRS coords.
 
Point cloud data request.
 
Used to store statistics of a point cloud dataset.
 
A rectangle specified with double values.
 
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
 
#define SIP_NODEFAULTCTORS
 
Q_DECLARE_TYPEINFO(QgsPointCloudNodeId, Q_PRIMITIVE_TYPE)
 
CORE_EXPORT uint qHash(QgsPointCloudNodeId id)
Hash function for indexed nodes.
 
const QgsCoordinateReferenceSystem & crs