QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
pointcloud
qgscopcupdate.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscopcupdate.h
3
---------------------
4
begin : January 2025
5
copyright : (C) 2025 by Martin Dobias
6
email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSCOPCUPDATE_H
17
#define QGSCOPCUPDATE_H
18
19
#include "lazperf/header.hpp"
20
#include "lazperf/vlr.hpp"
21
#include "qgis_core.h"
22
#include "
qgspointcloudindex.h
"
23
24
#define SIP_NO_FILE
25
37
class
CORE_EXPORT
QgsCopcUpdate
38
{
39
public
:
41
struct
UpdatedChunk
42
{
44
int32_t
pointCount
;
46
QByteArray
chunkData
;
47
};
48
50
bool
read
(
const
QString &inputFilename );
51
53
bool
write
(
const
QString &outputFilename,
const
QHash<QgsPointCloudNodeId, UpdatedChunk> &updatedChunks );
54
56
QString
errorMessage
()
const
{
return
mErrorMessage; }
57
65
static
bool
writeUpdatedFile(
const
QString &inputFilename,
const
QString &outputFilename,
const
QHash<QgsPointCloudNodeId, UpdatedChunk> &updatedChunks, QString *errorMessage =
nullptr
);
66
67
private
:
68
bool
readHeader();
69
void
readChunkTable();
70
void
readHierarchy();
71
72
private
:
73
QString mInputFilename;
74
std::ifstream mFile;
75
lazperf::header14 mHeader;
76
lazperf::copc_info_vlr mCopcVlr;
77
std::vector<lazperf::chunk> mChunks;
78
uint32_t mChunkCount = 0;
79
uint64_t mHierarchyOffset = 0;
80
std::vector<char> mHierarchyBlob;
81
std::vector<lazperf::evlr_header> mEvlrHeaders;
82
std::vector<std::vector<char>> mEvlrData;
83
QHash<uint64_t, QgsPointCloudNodeId> mOffsetToVoxel;
84
85
QString mErrorMessage;
86
};
87
88
#endif
// QGSCOPCUPDATE_H
QgsCopcUpdate
Handles update operations to a COPC file.
Definition
qgscopcupdate.h:38
QgsCopcUpdate::errorMessage
QString errorMessage() const
Returns error message.
Definition
qgscopcupdate.h:56
QgsCopcUpdate::read
bool read(const QString &inputFilename)
Reads input COPC file and initializes all the members.
Definition
qgscopcupdate.cpp:235
QgsCopcUpdate::write
bool write(const QString &outputFilename, const QHash< QgsPointCloudNodeId, UpdatedChunk > &updatedChunks)
Writes a COPC file with updated chunks.
Definition
qgscopcupdate.cpp:87
qgspointcloudindex.h
QgsCopcUpdate::UpdatedChunk
Keeps information how points of a single chunk has been modified.
Definition
qgscopcupdate.h:42
QgsCopcUpdate::UpdatedChunk::chunkData
QByteArray chunkData
Data of the chunk (compressed already with LAZ compressor).
Definition
qgscopcupdate.h:46
QgsCopcUpdate::UpdatedChunk::pointCount
int32_t pointCount
Number of points in the updated chunk.
Definition
qgscopcupdate.h:44
Generated on
for QGIS API Documentation by
1.17.0