18#ifndef QGSCOPCPOINTCLOUDINDEX_H
19#define QGSCOPCPOINTCLOUDINDEX_H
35#include "lazperf/vlr.hpp"
46 explicit QgsCopcPointCloudIndex();
47 ~QgsCopcPointCloudIndex();
49 std::unique_ptr<QgsPointCloudIndex>
clone()
const override;
51 void load(
const QString &fileName )
override;
91 bool gpsTimeFlag()
const;
95 bool loadHierarchy()
const;
103 virtual void fetchHierarchyPage( uint64_t offset, uint64_t byteSize )
const;
105 void populateHierarchy(
const char *hierarchyPageData, uint64_t byteSize )
const;
107 QByteArray fetchCopcStatisticsEvlrData()
const;
109 bool mIsValid =
false;
111 mutable std::ifstream mCopcFile;
112 mutable lazperf::copc_info_vlr mCopcInfoVlr;
113 mutable QHash<QgsPointCloudNodeId, QPair<uint64_t, int32_t>> mHierarchyNodePos;
115 QVariantMap mOriginalMetadata;
116 mutable std::optional<QgsPointCloudStatistics> mStatistics;
118 std::unique_ptr<QgsLazInfo> mLazInfo =
nullptr;
This class represents a coordinate reference system (CRS).
Class for extracting information contained in LAZ file such as the public header block and variable l...
Base class for handling loading QgsPointCloudBlock asynchronously.
Represents a indexed point clouds data in octree.
virtual bool hasNode(const QgsPointCloudNodeId &n) const
Returns whether the octree contain given node.
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.
void copyCommonProperties(QgsPointCloudIndex *destination) const
Copies common properties to the destination index.
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.
virtual QgsCoordinateReferenceSystem crs() const =0
Returns the coordinate reference system of the point cloud index.
virtual QgsPointCloudStatistics metadataStatistics() const
Returns the object containing the statistics metadata extracted from the dataset.
virtual QgsPointCloudBlockRequest * asyncNodeData(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request)=0
Returns a handle responsible for loading a node data block.
virtual void load(const QString &fileName)=0
Loads the index from the file.
virtual QgsPointCloudNode getNode(const QgsPointCloudNodeId &id) const
Returns object for a given node.
virtual QVariantMap originalMetadata() const =0
Returns the original metadata map.
virtual std::unique_ptr< QgsPointCloudBlock > nodeData(const QgsPointCloudNodeId &n, const QgsPointCloudRequest &request)=0
Returns node data block.
Represents a indexed point cloud node's position in octree.
Keeps metadata for indexed point cloud node.
Point cloud data request.
Class used to store statistics of a point cloud dataset.