ext
laslib
src
laswritepoint.hpp
Go to the documentation of this file.
1
/*
2
===============================================================================
3
4
FILE: LASwritePoint.hpp
5
6
CONTENTS:
7
8
Common interface for the classes that write points raw or compressed.
9
10
PROGRAMMERS:
11
12
martin.isenburg@gmail.com
13
14
COPYRIGHT:
15
16
(c) 2007-2011, Martin Isenburg, LASSO - tools to catch reality
17
18
This is free software; you can redistribute and/or modify it under the
19
terms of the GNU Lesser General Licence as published by the Free Software
20
Foundation. See the COPYING file for more information.
21
22
This software is distributed WITHOUT ANY WARRANTY and without even the
23
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24
25
CHANGE HISTORY:
26
27
6 October 2011 -- large file support & reading with missing chunk table
28
9 May 2011 -- the chunked compressor now allows variable chunk sizes
29
25 April 2011 -- added chunked laszip for random access decompression
30
10 January 2011 -- licensing change for LGPL release and liblas integration
31
7 December 2010 -- adapted from LASpointWriter for better code modularity
32
3 December 2010 -- updated to (somewhat) support LAS format 1.3
33
7 September 2008 -- updated to support LAS format 1.2
34
22 February 2007 -- created about an hour before henna's birthday
35
36
===============================================================================
37
*/
38
#ifndef LAS_WRITE_POINT_H
39
#define LAS_WRITE_POINT_H
40
41
#include "
mydefs.hpp
"
42
#include "
laszip.hpp
"
43
#include "
bytestreamout.hpp
"
44
45
class
LASwriteItem
;
46
class
EntropyEncoder
;
47
48
class
LASwritePoint
49
{
50
public
:
51
LASwritePoint
();
52
~LASwritePoint
();
53
54
// should only be called *once*
55
BOOL
setup
(
const
U32
num_items,
const
LASitem
* items,
const
LASzip
* laszip=0);
56
57
BOOL
init
(
ByteStreamOut
*
outstream
);
58
BOOL
write
(
const
U8
*
const
* point);
59
BOOL
chunk
();
60
BOOL
done
();
61
62
private
:
63
ByteStreamOut
*
outstream
;
64
U32
num_writers
;
65
LASwriteItem
**
writers
;
66
LASwriteItem
**
writers_raw
;
67
LASwriteItem
**
writers_compressed
;
68
EntropyEncoder
*
enc
;
69
// used for chunking
70
U32
chunk_size
;
71
U32
chunk_count
;
72
U32
number_chunks
;
73
U32
alloced_chunks
;
74
U32
*
chunk_sizes
;
75
U32
*
chunk_bytes
;
76
I64
chunk_start_position
;
77
I64
chunk_table_start_position
;
78
BOOL
add_chunk_to_table
();
79
BOOL
write_chunk_table
();
80
};
81
82
#endif
LASwritePoint::done
BOOL done()
Definition:
laswritepoint.cpp:289
LASwritePoint::chunk
BOOL chunk()
Definition:
laswritepoint.cpp:276
BOOL
int BOOL
Definition:
mydefs.hpp:57
LASwritePoint::writers
LASwriteItem ** writers
Definition:
laswritepoint.hpp:65
LASwritePoint::outstream
ByteStreamOut * outstream
Definition:
laswritepoint.hpp:63
LASwritePoint::writers_raw
LASwriteItem ** writers_raw
Definition:
laswritepoint.hpp:66
ByteStreamOut
Definition:
bytestreamout.hpp:36
LASwritePoint::writers_compressed
LASwriteItem ** writers_compressed
Definition:
laswritepoint.hpp:67
LASwritePoint::alloced_chunks
U32 alloced_chunks
Definition:
laswritepoint.hpp:73
U32
unsigned int U32
Definition:
mydefs.hpp:39
LASwriteItem
Definition:
laswriteitem.hpp:39
LASwritePoint::chunk_table_start_position
I64 chunk_table_start_position
Definition:
laswritepoint.hpp:77
LASitem
Definition:
laszip.hpp:70
LASwritePoint::init
BOOL init(ByteStreamOut *outstream)
Definition:
laswritepoint.cpp:204
I64
long long I64
Definition:
mydefs.hpp:48
U8
unsigned char U8
Definition:
mydefs.hpp:41
LASzip
Definition:
laszip.hpp:80
EntropyEncoder
Definition:
entropyencoder.hpp:38
LASwritePoint::LASwritePoint
LASwritePoint()
Definition:
laswritepoint.cpp:42
LASwritePoint::write_chunk_table
BOOL write_chunk_table()
Definition:
laswritepoint.cpp:338
LASwritePoint::number_chunks
U32 number_chunks
Definition:
laswritepoint.hpp:72
bytestreamout.hpp
LASwritePoint::chunk_start_position
I64 chunk_start_position
Definition:
laswritepoint.hpp:76
LASwritePoint::chunk_count
U32 chunk_count
Definition:
laswritepoint.hpp:71
LASwritePoint::setup
BOOL setup(const U32 num_items, const LASitem *items, const LASzip *laszip=0)
Definition:
laswritepoint.cpp:61
mydefs.hpp
LASwritePoint::add_chunk_to_table
BOOL add_chunk_to_table()
Definition:
laswritepoint.cpp:311
LASwritePoint
Definition:
laswritepoint.hpp:48
laszip.hpp
LASwritePoint::chunk_sizes
U32 * chunk_sizes
Definition:
laswritepoint.hpp:74
LASwritePoint::enc
EntropyEncoder * enc
Definition:
laswritepoint.hpp:68
LASwritePoint::chunk_size
U32 chunk_size
Definition:
laswritepoint.hpp:70
LASwritePoint::num_writers
U32 num_writers
Definition:
laswritepoint.hpp:64
LASwritePoint::write
BOOL write(const U8 *const *point)
Definition:
laswritepoint.cpp:243
LASwritePoint::~LASwritePoint
~LASwritePoint()
Definition:
laswritepoint.cpp:388
LASwritePoint::chunk_bytes
U32 * chunk_bytes
Definition:
laswritepoint.hpp:75
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz
, Alexander Mock
, Lars Kiesow
, Lukas Kalbertodt
, Tristan Igelbrink
, Johan M. von Behren
, Dominik Feldschnieders
, Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:07