QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
pointcloud
qgslazdecoder.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslazdecoder.h
3
--------------------
4
begin : March 2022
5
copyright : (C) 2022 by Belgacem Nedjima
6
email : belgacem dot nedjima at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSLAZDECODER_H
19
#define QGSLAZDECODER_H
20
21
22
#include <string>
23
24
#include "
qgspointcloudattribute.h
"
25
#include "
qgspointcloudblock.h
"
26
27
#include <QString>
28
29
#define SIP_NO_FILE
30
32
33
34
class
QgsPointCloudExpression;
35
class
QgsLazInfo
;
36
class
QgsRectangle
;
37
38
template
<
typename
T>
bool
lazStoreToStream_(
char
*s,
size_t
position,
QgsPointCloudAttribute::DataType
type, T value );
39
bool
lazSerialize_(
char
*data,
size_t
outputPosition,
QgsPointCloudAttribute::DataType
outputType,
const
char
*input,
QgsPointCloudAttribute::DataType
inputType,
int
inputSize,
size_t
inputPosition );
40
41
class
QgsLazDecoder
42
{
43
public
:
44
enum class
LazAttribute
45
{
46
X,
47
Y,
48
Z,
49
Classification,
50
Intensity,
51
ReturnNumber,
52
NumberOfReturns,
53
ScanDirectionFlag,
54
EdgeOfFlightLine,
55
ScanAngleRank,
56
UserData,
57
PointSourceId,
58
GpsTime,
59
Red,
60
Green,
61
Blue,
62
ScannerChannel,
63
Synthetic,
64
KeyPoint,
65
Withheld,
66
Overlap,
67
NIR,
68
ExtraBytes,
69
MissingOrUnknown
70
};
71
72
struct
RequestedAttributeDetails
73
{
74
RequestedAttributeDetails( LazAttribute attribute,
QgsPointCloudAttribute::DataType
type,
int
size,
int
offset = -1 )
75
: attribute( attribute )
76
, type( type )
77
, size( size )
78
, offset( offset )
79
{}
80
81
LazAttribute attribute;
82
QgsPointCloudAttribute::DataType
type;
83
int
size;
84
int
offset;
// Used in case the attribute is an extra byte attribute
85
};
86
87
static
std::unique_ptr<QgsPointCloudBlock> decompressLaz(
88
const
QString &filename,
const
QgsPointCloudAttributeCollection &requestedAttributes, QgsPointCloudExpression &filterExpression, QgsRectangle &filterRect
89
);
90
static
std::unique_ptr<QgsPointCloudBlock> decompressLaz(
91
const
QByteArray &data,
const
QgsPointCloudAttributeCollection &requestedAttributes, QgsPointCloudExpression &filterExpression, QgsRectangle &filterRect
92
);
93
static
std::unique_ptr<QgsPointCloudBlock> decompressCopc(
94
const
QByteArray &data, QgsLazInfo &lazInfo, int32_t pointCount,
const
QgsPointCloudAttributeCollection &requestedAttributes, QgsPointCloudExpression &filterExpression, QgsRectangle &filterRect
95
);
96
97
#if defined( _MSC_VER )
98
104
static
std::wstring toNativePath(
const
QString &filename );
105
#else
107
static
std::string toNativePath(
const
QString &filename );
108
#endif
109
};
110
112
#endif
// QGSLAZDECODER_H
QgsLazInfo
Extracts information contained in a LAZ file, such as the public header block and variable length rec...
Definition
qgslazinfo.h:38
QgsPointCloudAttribute::DataType
DataType
Systems of unit measurement.
Definition
qgspointcloudattribute.h:47
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:47
qgspointcloudattribute.h
qgspointcloudblock.h
Generated on
for QGIS API Documentation by
1.17.0