26#include "lazperf/header.hpp"
63 QString
error()
const {
return mError; }
66 void parseRawHeader(
char *data, uint64_t length );
69 void parseRawVlrEntries(
char *data, uint64_t length );
74 return mHeader.version.major == 1 && mHeader.version.minor == 4 ? mHeader.point_count_14 : mHeader.point_count;
83 QPair<uint8_t, uint8_t>
version()
const {
return mVersion; }
99 uint32_t firstVariableLengthRecord()
const;
108 uint32_t
evlrCount()
const {
return mHeader.evlr_count; }
114 QVariantMap toMetadata()
const;
117 QByteArray vlrData( QString userId,
int recordId );
123 QVector<ExtraBytesAttributeDetails>
extrabytes()
const {
return mExtrabyteAttributes; }
127 lazperf::header14
header()
const {
return mHeader; }
131 static QVector<ExtraBytesAttributeDetails> parseExtrabytes(
char *rawData,
int length,
int pointRecordLength );
134 static QgsLazInfo fromFile( std::ifstream &file );
139 static bool supportsRangeQueries( QUrl &url );
142 void parseHeader( lazperf::header14 &header );
144 void parseLazAttributes();
145 void parseExtrabyteAttributes();
147 bool mIsValid =
false;
150 lazperf::header14 mHeader;
153 QPair<uint16_t, uint16_t> mCreationYearDay;
154 QPair<uint8_t, uint8_t> mVersion;
155 int mPointFormat = -1;
166 QVector<LazVlr> mVlrVector;
169 QVector<ExtraBytesAttributeDetails> mExtrabyteAttributes;
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...
QString systemId() const
Returns the system identifier contained in the LAZ file public header block.
QgsVector3D maxCoords() const
Returns the maximum coordinate across X, Y and Z axis.
QgsPointCloudAttributeCollection attributes() const
Returns the list of attributes contained in the LAZ file.
int extrabytesCount() const
Returns the number of extrabytes contained in the LAZ dataset.
bool isValid() const
Returns whether the LAZ header data passed to this class is from a valid LAZ file.
QString projectId() const
Returns the project identifier contained in the LAZ file public header block (Optional field)
uint64_t firstEvlrOffset() const
Returns the absolute offset to the first extended point record in the LAZ file.
QString error() const
Returns an error string detailing what went wrong with reading the LAZ info.
uint32_t firstPointRecordOffset() const
Returns the absolute offset to the first point record in the LAZ file.
uint32_t evlrCount() const
Returns the absolute offset to the first variable length record in the LAZ file.
QPair< uint8_t, uint8_t > version() const
Returns the LAZ specification version of the LAZ file.
lazperf::header14 header() const
Returns the LAZPERF header object.
QgsVector3D scale() const
Returns the scale of the points coordinates.
uint64_t pointCount() const
Returns the number of points contained in the LAZ file.
int pointFormat() const
Returns the point format of the point records contained in the LAZ file.
QPair< uint16_t, uint16_t > creationYearDay() const
Returns the pair ( creation_year, creation_day ) extracted from the LAZ file public header block.
QgsCoordinateReferenceSystem crs() const
Returns the coordinate system stored in the LAZ file.
QVector< ExtraBytesAttributeDetails > extrabytes() const
Returns the list of extrabytes contained in the LAZ file.
QString softwareId() const
Returns the identifier of the software used to generate the LAZ file public header block.
QgsVector3D minCoords() const
Returns the minimum coordinate across X, Y and Z axis.
QgsVector3D offset() const
Returns the offset of the points coordinates.
int pointRecordLength() const
Returns the length of each point record in bytes.
Collection of point cloud attributes.
DataType
Systems of unit measurement.
Class for storage of 3D vectors similar to QVector3D, with the difference that it uses double precisi...