QGIS API Documentation 3.39.0-Master (93ce9bf5c90)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
QgsPointCloudAttribute Class Reference

Attribute for point cloud data pair of name and size in bytes. More...

#include <qgspointcloudattribute.h>

Public Types

enum  DataType {
  Char , UChar , Short , UShort ,
  Int32 , UInt32 , Int64 , UInt64 ,
  Float , Double
}
 Systems of unit measurement. More...
 

Public Member Functions

 QgsPointCloudAttribute ()
 
 QgsPointCloudAttribute (const QString &name, DataType type)
 Ctor.
 
double convertValueToDouble (const char *ptr) const
 Returns the attribute's value as a double for data pointed to by ptr.
 
QString displayType () const
 Returns the type to use when displaying this field.
 
QString name () const
 Returns name of the attribute.
 
int size () const
 Returns size of the attribute in bytes.
 
DataType type () const
 Returns the data type.
 
QMetaType::Type variantType () const
 Returns the most suitable equivalent QVariant data type to this attribute type.
 

Static Public Member Functions

static QVariantMap getAttributeMap (const char *data, std::size_t recordOffset, const QgsPointCloudAttributeCollection &attributeCollection)
 Retrieves all the attributes of a point.
 
static void getPointXYZ (const char *ptr, int i, std::size_t pointRecordSize, int xOffset, QgsPointCloudAttribute::DataType xType, int yOffset, QgsPointCloudAttribute::DataType yType, int zOffset, QgsPointCloudAttribute::DataType zType, const QgsVector3D &indexScale, const QgsVector3D &indexOffset, double &x, double &y, double &z)
 Retrieves the x, y, z values for the point at index i.
 
static bool isNumeric (DataType type)
 Returns true if the specified data type is numeric.
 

Detailed Description

Attribute for point cloud data pair of name and size in bytes.

Since
QGIS 3.18

Definition at line 40 of file qgspointcloudattribute.h.

Member Enumeration Documentation

◆ DataType

Systems of unit measurement.

Enumerator
Char 

Char 1 byte.

UChar 

Unsigned char 1 byte.

Short 

Short int 2 bytes.

UShort 

Unsigned short int 2 bytes.

Int32 

Int32 4 bytes.

UInt32 

Unsigned int32 4 bytes.

Int64 

Int64 8 bytes.

UInt64 

Unsigned int64 8 bytes.

Float 

Float 4 bytes.

Double 

Double 8 bytes.

Definition at line 44 of file qgspointcloudattribute.h.

Constructor & Destructor Documentation

◆ QgsPointCloudAttribute() [1/2]

QgsPointCloudAttribute::QgsPointCloudAttribute ( )
default

◆ QgsPointCloudAttribute() [2/2]

QgsPointCloudAttribute::QgsPointCloudAttribute ( const QString &  name,
DataType  type 
)

Ctor.

Definition at line 23 of file qgspointcloudattribute.cpp.

Member Function Documentation

◆ convertValueToDouble()

double QgsPointCloudAttribute::convertValueToDouble ( const char *  ptr) const

Returns the attribute's value as a double for data pointed to by ptr.

Note
Not available in Python binding
Since
QGIS 3.26

Definition at line 251 of file qgspointcloudattribute.cpp.

◆ displayType()

QString QgsPointCloudAttribute::displayType ( ) const

Returns the type to use when displaying this field.

This will be used when the full datatype with details has to displayed to the user.

See also
type()

Definition at line 52 of file qgspointcloudattribute.cpp.

◆ getAttributeMap()

QVariantMap QgsPointCloudAttribute::getAttributeMap ( const char *  data,
std::size_t  recordOffset,
const QgsPointCloudAttributeCollection attributeCollection 
)
static

Retrieves all the attributes of a point.

Definition at line 273 of file qgspointcloudattribute.cpp.

◆ getPointXYZ()

void QgsPointCloudAttribute::getPointXYZ ( const char *  ptr,
int  i,
std::size_t  pointRecordSize,
int  xOffset,
QgsPointCloudAttribute::DataType  xType,
int  yOffset,
QgsPointCloudAttribute::DataType  yType,
int  zOffset,
QgsPointCloudAttribute::DataType  zType,
const QgsVector3D indexScale,
const QgsVector3D indexOffset,
double &  x,
double &  y,
double &  z 
)
static

Retrieves the x, y, z values for the point at index i.

Definition at line 258 of file qgspointcloudattribute.cpp.

◆ isNumeric()

bool QgsPointCloudAttribute::isNumeric ( QgsPointCloudAttribute::DataType  type)
static

Returns true if the specified data type is numeric.

Definition at line 80 of file qgspointcloudattribute.cpp.

◆ name()

QString QgsPointCloudAttribute::name ( ) const
inline

Returns name of the attribute.

Definition at line 63 of file qgspointcloudattribute.h.

◆ size()

int QgsPointCloudAttribute::size ( ) const
inline

Returns size of the attribute in bytes.

Definition at line 66 of file qgspointcloudattribute.h.

◆ type()

DataType QgsPointCloudAttribute::type ( ) const
inline

Returns the data type.

See also
variantType()

Definition at line 73 of file qgspointcloudattribute.h.

◆ variantType()

QMetaType::Type QgsPointCloudAttribute::variantType ( ) const

Returns the most suitable equivalent QVariant data type to this attribute type.

See also
type()

Definition at line 30 of file qgspointcloudattribute.cpp.


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