23#include "lazperf/header.hpp"
62 QString
error()
const {
return mError; }
65 void parseRawHeader(
char *data, uint64_t length );
68 void parseRawVlrEntries(
char *data, uint64_t length );
73 return mHeader.version.major == 1 && mHeader.version.minor == 4 ? mHeader.point_count_14 : mHeader.point_count;
82 QPair<uint8_t, uint8_t>
version()
const {
return mVersion; }
98 uint32_t firstVariableLengthRecord()
const;
107 uint32_t
evlrCount()
const {
return mHeader.evlr_count; }
113 QVariantMap toMetadata()
const;
116 QByteArray vlrData( QString userId,
int recordId );
122 QVector<ExtraBytesAttributeDetails>
extrabytes()
const {
return mExtrabyteAttributes; }
126 lazperf::header14
header()
const {
return mHeader; }
130 static QVector<ExtraBytesAttributeDetails> parseExtrabytes(
char *rawData,
int length,
int pointRecordLength );
133 static QgsLazInfo fromFile( std::ifstream &file );
135 static QgsLazInfo fromUrl( QUrl &url,
const QString &authcfg = QString() );
138 void parseHeader( lazperf::header14 &header );
140 void parseLazAttributes();
141 void parseExtrabyteAttributes();
143 bool mIsValid =
false;
146 lazperf::header14 mHeader;
149 QPair<uint16_t, uint16_t> mCreationYearDay;
150 QPair<uint8_t, uint8_t> mVersion;
151 int mPointFormat = -1;
162 QVector<LazVlr> mVlrVector;
165 QVector<ExtraBytesAttributeDetails> mExtrabyteAttributes;
Represents a coordinate reference system (CRS).
Extracts information contained in a LAZ file, such as the public header block and variable length rec...
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.
QgsLazInfo()
Constructor for an empty laz info parser.
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.
A collection of point cloud attributes.
DataType
Systems of unit measurement.
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...