QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
QgsLazInfo Class Reference

Class for extracting information contained in 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)
 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.
 
static bool supportsRangeQueries (QUrl &url)
 Static function to check whether the server of URL url supports range queries.
 

Detailed Description

Class for extracting information contained in LAZ file such as the public header block and variable length records.

Since
QGIS 3.26

Definition at line 38 of file qgslazinfo.h.

Constructor & Destructor Documentation

◆ QgsLazInfo()

QgsLazInfo::QgsLazInfo ( )

Constructor for an empty laz info parser.

Definition at line 28 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 120 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 81 of file qgslazinfo.h.

◆ crs()

QgsCoordinateReferenceSystem QgsLazInfo::crs ( ) const
inline

Returns the coordinate system stored in the LAZ file.

Definition at line 111 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 63 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 108 of file qgslazinfo.h.

◆ extrabytes()

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

Returns the list of extrabytes contained in the LAZ file.

Definition at line 123 of file qgslazinfo.h.

◆ extrabytesCount()

int QgsLazInfo::extrabytesCount ( ) const
inline

Returns the number of extrabytes contained in the LAZ dataset.

Definition at line 103 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 106 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 97 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 30 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 275 of file qgslazinfo.cpp.

◆ fromUrl()

QgsLazInfo QgsLazInfo::fromUrl ( QUrl &  url)
static

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

Definition at line 293 of file qgslazinfo.cpp.

◆ header()

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

Returns the LAZPERF header object.

Definition at line 127 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 60 of file qgslazinfo.h.

◆ maxCoords()

QgsVector3D QgsLazInfo::maxCoords ( ) const
inline

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

Definition at line 95 of file qgslazinfo.h.

◆ minCoords()

QgsVector3D QgsLazInfo::minCoords ( ) const
inline

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

Definition at line 93 of file qgslazinfo.h.

◆ offset()

QgsVector3D QgsLazInfo::offset ( ) const
inline

Returns the offset of the points coordinates.

Definition at line 79 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 207 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 41 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 55 of file qgslazinfo.cpp.

◆ pointCount()

uint64_t QgsLazInfo::pointCount ( ) const
inline

Returns the number of points contained in the LAZ file.

Definition at line 72 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 85 of file qgslazinfo.h.

◆ pointRecordLength()

int QgsLazInfo::pointRecordLength ( ) const
inline

Returns the length of each point record in bytes.

Definition at line 101 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 87 of file qgslazinfo.h.

◆ scale()

QgsVector3D QgsLazInfo::scale ( ) const
inline

Returns the scale of the points coordinates.

Definition at line 77 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 91 of file qgslazinfo.h.

◆ supportsRangeQueries()

bool QgsLazInfo::supportsRangeQueries ( QUrl &  url)
static

Static function to check whether the server of URL url supports range queries.

Definition at line 352 of file qgslazinfo.cpp.

◆ systemId()

QString QgsLazInfo::systemId ( ) const
inline

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

Definition at line 89 of file qgslazinfo.h.

◆ toMetadata()

QVariantMap QgsLazInfo::toMetadata ( ) const

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

Definition at line 122 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 83 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 142 of file qgslazinfo.cpp.


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