QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
QgsLazInfo Class Reference

Extracts information contained in a LAZ file, such as the public header block and variable length records. More...

#include <qgslazinfo.h>

Classes

struct  ExtraBytesAttributeDetails
struct  LazVlr

Public Member Functions

 QgsLazInfo ()
 Constructor for an empty laz info parser.
QgsPointCloudAttributeCollection attributes () const
 Returns the list of attributes 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.
QString error () const
 Returns an error string detailing what went wrong with reading the LAZ info.
uint32_t evlrCount () const
 Returns the absolute offset to the first variable length record in the LAZ file.
QVector< ExtraBytesAttributeDetailsextrabytes () const
 Returns the list of extrabytes contained in the LAZ file.
int extrabytesCount () const
 Returns the number of extrabytes contained in the LAZ dataset.
uint64_t firstEvlrOffset () const
 Returns the absolute offset to the first extended point record in the LAZ file.
uint32_t firstPointRecordOffset () const
 Returns the absolute offset to the first point record in the LAZ file.
uint32_t firstVariableLengthRecord () const
 Returns the absolute offset to the first variable length record in the LAZ file.
lazperf::header14 header () const
 Returns the LAZPERF header object.
bool isValid () const
 Returns whether the LAZ header data passed to this class is from a valid LAZ file.
QgsVector3D maxCoords () const
 Returns the maximum coordinate across X, Y and Z axis.
QgsVector3D minCoords () const
 Returns the minimum coordinate across X, Y and Z axis.
QgsVector3D offset () const
 Returns the offset of the points coordinates.
void parseRawHeader (char *data, uint64_t length)
 Parses the raw header data loaded from a LAZ file.
void parseRawVlrEntries (char *data, uint64_t length)
 Parses the variable length records found in the array data of length length.
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.
int pointRecordLength () const
 Returns the length of each point record in bytes.
QString projectId () const
 Returns the project identifier contained in the LAZ file public header block (Optional field).
QgsVector3D scale () const
 Returns the scale of the points coordinates.
QString softwareId () const
 Returns the identifier of the software used to generate the LAZ file public header block.
QString systemId () const
 Returns the system identifier contained in the LAZ file public header block.
QVariantMap toMetadata () const
 Returns a map containing various metadata extracted from the LAZ file.
QPair< uint8_t, uint8_t > version () const
 Returns the LAZ specification version of the LAZ file.
QByteArray vlrData (QString userId, int recordId)
 Returns the binary data of the variable length record with the user identifier userId and record identifier recordId.

Static Public Member Functions

static QgsLazInfo fromFile (std::ifstream &file)
 Static function to create a QgsLazInfo class from a file.
static QgsLazInfo fromUrl (QUrl &url, const QString &authcfg=QString())
 Static function to create a QgsLazInfo class from a file over network.
static QVector< ExtraBytesAttributeDetailsparseExtrabytes (char *rawData, int length, int pointRecordLength)
 Static function to parse the raw extrabytes VLR into a list of recognizable extrabyte attributes.

Detailed Description

Extracts information contained in a LAZ file, such as the public header block and variable length records.

Since
QGIS 3.26

Definition at line 37 of file qgslazinfo.h.

Constructor & Destructor Documentation

◆ QgsLazInfo()

QgsLazInfo::QgsLazInfo ( )

Constructor for an empty laz info parser.

Definition at line 27 of file qgslazinfo.cpp.

Member Function Documentation

◆ attributes()

QgsPointCloudAttributeCollection QgsLazInfo::attributes ( ) const
inline

Returns the list of attributes contained in the LAZ file.

Definition at line 119 of file qgslazinfo.h.

◆ creationYearDay()

QPair< uint16_t, uint16_t > QgsLazInfo::creationYearDay ( ) const
inline

Returns the pair ( creation_year, creation_day ) extracted from the LAZ file public header block.

Definition at line 80 of file qgslazinfo.h.

◆ crs()

QgsCoordinateReferenceSystem QgsLazInfo::crs ( ) const
inline

Returns the coordinate system stored in the LAZ file.

Definition at line 110 of file qgslazinfo.h.

◆ error()

QString QgsLazInfo::error ( ) const
inline

Returns an error string detailing what went wrong with reading the LAZ info.

Definition at line 62 of file qgslazinfo.h.

◆ evlrCount()

uint32_t QgsLazInfo::evlrCount ( ) const
inline

Returns the absolute offset to the first variable length record in the LAZ file.

Definition at line 107 of file qgslazinfo.h.

◆ extrabytes()

QVector< ExtraBytesAttributeDetails > QgsLazInfo::extrabytes ( ) const
inline

Returns the list of extrabytes contained in the LAZ file.

Definition at line 122 of file qgslazinfo.h.

◆ extrabytesCount()

int QgsLazInfo::extrabytesCount ( ) const
inline

Returns the number of extrabytes contained in the LAZ dataset.

Definition at line 102 of file qgslazinfo.h.

◆ firstEvlrOffset()

uint64_t QgsLazInfo::firstEvlrOffset ( ) const
inline

Returns the absolute offset to the first extended point record in the LAZ file.

Definition at line 105 of file qgslazinfo.h.

◆ firstPointRecordOffset()

uint32_t QgsLazInfo::firstPointRecordOffset ( ) const
inline

Returns the absolute offset to the first point record in the LAZ file.

Definition at line 96 of file qgslazinfo.h.

◆ firstVariableLengthRecord()

uint32_t QgsLazInfo::firstVariableLengthRecord ( ) const

Returns the absolute offset to the first variable length record in the LAZ file.

Definition at line 29 of file qgslazinfo.cpp.

◆ fromFile()

QgsLazInfo QgsLazInfo::fromFile ( std::ifstream & file)
static

Static function to create a QgsLazInfo class from a file.

Definition at line 277 of file qgslazinfo.cpp.

◆ fromUrl()

QgsLazInfo QgsLazInfo::fromUrl ( QUrl & url,
const QString & authcfg = QString() )
static

Static function to create a QgsLazInfo class from a file over network.

Definition at line 295 of file qgslazinfo.cpp.

◆ header()

lazperf::header14 QgsLazInfo::header ( ) const
inline

Returns the LAZPERF header object.

Definition at line 126 of file qgslazinfo.h.

◆ isValid()

bool QgsLazInfo::isValid ( ) const
inline

Returns whether the LAZ header data passed to this class is from a valid LAZ file.

Definition at line 59 of file qgslazinfo.h.

◆ maxCoords()

QgsVector3D QgsLazInfo::maxCoords ( ) const
inline

Returns the maximum coordinate across X, Y and Z axis.

Definition at line 94 of file qgslazinfo.h.

◆ minCoords()

QgsVector3D QgsLazInfo::minCoords ( ) const
inline

Returns the minimum coordinate across X, Y and Z axis.

Definition at line 92 of file qgslazinfo.h.

◆ offset()

QgsVector3D QgsLazInfo::offset ( ) const
inline

Returns the offset of the points coordinates.

Definition at line 78 of file qgslazinfo.h.

◆ parseExtrabytes()

QVector< QgsLazInfo::ExtraBytesAttributeDetails > QgsLazInfo::parseExtrabytes ( char * rawData,
int length,
int pointRecordLength )
static

Static function to parse the raw extrabytes VLR into a list of recognizable extrabyte attributes.

Definition at line 209 of file qgslazinfo.cpp.

◆ parseRawHeader()

void QgsLazInfo::parseRawHeader ( char * data,
uint64_t length )

Parses the raw header data loaded from a LAZ file.

Definition at line 40 of file qgslazinfo.cpp.

◆ parseRawVlrEntries()

void QgsLazInfo::parseRawVlrEntries ( char * data,
uint64_t length )

Parses the variable length records found in the array data of length length.

Definition at line 54 of file qgslazinfo.cpp.

◆ pointCount()

uint64_t QgsLazInfo::pointCount ( ) const
inline

Returns the number of points contained in the LAZ file.

Definition at line 71 of file qgslazinfo.h.

◆ pointFormat()

int QgsLazInfo::pointFormat ( ) const
inline

Returns the point format of the point records contained in the LAZ file.

Definition at line 84 of file qgslazinfo.h.

◆ pointRecordLength()

int QgsLazInfo::pointRecordLength ( ) const
inline

Returns the length of each point record in bytes.

Definition at line 100 of file qgslazinfo.h.

◆ projectId()

QString QgsLazInfo::projectId ( ) const
inline

Returns the project identifier contained in the LAZ file public header block (Optional field).

Definition at line 86 of file qgslazinfo.h.

◆ scale()

QgsVector3D QgsLazInfo::scale ( ) const
inline

Returns the scale of the points coordinates.

Definition at line 76 of file qgslazinfo.h.

◆ softwareId()

QString QgsLazInfo::softwareId ( ) const
inline

Returns the identifier of the software used to generate the LAZ file public header block.

Definition at line 90 of file qgslazinfo.h.

◆ systemId()

QString QgsLazInfo::systemId ( ) const
inline

Returns the system identifier contained in the LAZ file public header block.

Definition at line 88 of file qgslazinfo.h.

◆ toMetadata()

QVariantMap QgsLazInfo::toMetadata ( ) const

Returns a map containing various metadata extracted from the LAZ file.

Definition at line 121 of file qgslazinfo.cpp.

◆ version()

QPair< uint8_t, uint8_t > QgsLazInfo::version ( ) const
inline

Returns the LAZ specification version of the LAZ file.

Definition at line 82 of file qgslazinfo.h.

◆ vlrData()

QByteArray QgsLazInfo::vlrData ( QString userId,
int recordId )

Returns the binary data of the variable length record with the user identifier userId and record identifier recordId.

Definition at line 141 of file qgslazinfo.cpp.


The documentation for this class was generated from the following files: