Skip to content

Commit ed24075

Browse files
author
jochen.keil
committed
documentation update; update to LAS_TOOLS_VERSION 220310; lasindex: added -o parameter; added '-iptx_transform' option;
sync LASzip; Fix fseek for gcc for las/lax file > 2Gb
1 parent 20e9da5 commit ed24075

95 files changed

Lines changed: 13483 additions & 12677 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
22 March 2022 -- lasindex: added -o parameter; Fix fseek for gcc for las/lax file > 2Gb
2+
22 March 2022 -- LASlib: added '-iptx_transform' option;
13
7 January 2022 -- lastrack: extra_byte output bugfix
24
30 December 2021 -- fix small memory leak in lasreaditemcompressed_v3.cpp
35
1 December 2021 -- lasclip: merge split output with same shape names

LASlib/example/lasexample_simple_classification.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
PROGRAMMERS:
1515
16-
martin.isenburg@rapidlasso.de - http://rapidlasso.de
16+
info@rapidlasso.de - http://rapidlasso.de
1717
1818
COPYRIGHT:
1919

LASlib/inc/lasdefinitions.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#ifndef LAS_DEFINITIONS_HPP
5050
#define LAS_DEFINITIONS_HPP
5151

52-
#define LAS_TOOLS_VERSION 211112
52+
#define LAS_TOOLS_VERSION 220310
5353

5454
#include <stdio.h>
5555
#include <string.h>
@@ -84,6 +84,10 @@
8484
#define LAS_TOOLS_IO_IBUFFER_SIZE 262144
8585
#define LAS_TOOLS_IO_OBUFFER_SIZE 262144
8686

87+
#ifndef MAX_PATH // linux
88+
#define MAX_PATH 256
89+
#endif
90+
8791
class LASvlr
8892
{
8993
public:

LASlib/inc/lasreader.hpp

Lines changed: 297 additions & 294 deletions
Large diffs are not rendered by default.

LASlib/inc/lasreader_txt.hpp

Lines changed: 81 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
/*
22
===============================================================================
33
4-
FILE: lasreader_txt.hpp
4+
FILE: lasreader_txt.hpp
55
6-
CONTENTS:
6+
CONTENTS:
77
8-
Reads LIDAR points in LAS format through on-the-fly conversion from ASCII.
8+
Reads LIDAR points in LAS format through on-the-fly conversion from ASCII.
99
10-
PROGRAMMERS:
10+
PROGRAMMERS:
1111
12-
info@rapidlasso.de - https://rapidlasso.de
12+
info@rapidlasso.de - https://rapidlasso.de
1313
14-
COPYRIGHT:
14+
COPYRIGHT:
1515
16-
(c) 2007-2017, rapidlasso GmbH - fast tools to catch reality
16+
(c) 2007-2017, rapidlasso GmbH - fast tools to catch reality
1717
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 LICENSE.txt file for more information.
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 LICENSE.txt file for more information.
2121
22-
This software is distributed WITHOUT ANY WARRANTY and without even the
23-
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22+
This software is distributed WITHOUT ANY WARRANTY and without even the
23+
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2424
25-
CHANGE HISTORY:
25+
CHANGE HISTORY:
2626
27-
7 September 2018 -- replaced calls to _strdup with calls to the LASCopyString macro
28-
22 July 2018 -- bug fix for parsing classfication to point type 6 (or higher)
29-
11 January 2017 -- added with<h>eld and scanner channe<l> for the parse string
30-
11 January 2017 -- added 'k'eypoint and 'o'verlap flags for the parse string
31-
17 January 2016 -- pre-scaling and pre-offsetting of "extra bytes" attributes
32-
9 July 2014 -- allowing input from stdin after the 7:1 in the World Cup
33-
8 April 2011 -- created after starting a google group for LAStools users
27+
10 March 2022 -- added '-iptx_transform' option
28+
7 September 2018 -- replaced calls to _strdup with calls to the LASCopyString macro
29+
22 July 2018 -- bug fix for parsing classfication to point type 6 (or higher)
30+
11 January 2017 -- added with<h>eld and scanner channe<l> for the parse string
31+
11 January 2017 -- added 'k'eypoint and 'o'verlap flags for the parse string
32+
17 January 2016 -- pre-scaling and pre-offsetting of "extra bytes" attributes
33+
9 July 2014 -- allowing input from stdin after the 7:1 in the World Cup
34+
8 April 2011 -- created after starting a google group for LAStools users
3435
3536
===============================================================================
3637
*/
@@ -44,92 +45,93 @@
4445
class LASreaderTXT : public LASreader
4546
{
4647
public:
48+
BOOL iptx_transform;
49+
void set_pts(BOOL pts);
50+
void set_ptx(BOOL ptx);
51+
void set_ptx_transform(BOOL ptx);
4752

48-
void set_pts(BOOL pts);
49-
void set_ptx(BOOL ptx);
53+
void set_translate_intensity(F32 translate_intensity);
54+
void set_scale_intensity(F32 scale_intensity);
55+
void set_translate_scan_angle(F32 translate_scan_angle);
56+
void set_scale_scan_angle(F32 scale_scan_angle);
57+
void set_scale_factor(const F64* scale_factor);
58+
void set_offset(const F64* offset);
59+
void add_attribute(I32 data_type, const CHAR* name, const CHAR* description = 0, F64 scale = 1.0, F64 offset = 0.0, F64 pre_scale = 1.0, F64 pre_offset = 0.0, F64 no_data = F64_MAX);
60+
virtual BOOL open(const CHAR* file_name, U8 point_type = 0, const CHAR* parse_string = 0, I32 skip_lines = 0, BOOL populate_header = FALSE);
61+
virtual BOOL open(FILE* file, const CHAR* file_name = 0, U8 point_type = 0, const CHAR* parse_string = 0, I32 skip_lines = 0, BOOL populate_header = FALSE);
5062

51-
void set_translate_intensity(F32 translate_intensity);
52-
void set_scale_intensity(F32 scale_intensity);
53-
void set_translate_scan_angle(F32 translate_scan_angle);
54-
void set_scale_scan_angle(F32 scale_scan_angle);
55-
void set_scale_factor(const F64* scale_factor);
56-
void set_offset(const F64* offset);
57-
void add_attribute(I32 data_type, const CHAR* name, const CHAR* description=0, F64 scale=1.0, F64 offset=0.0, F64 pre_scale=1.0, F64 pre_offset=0.0, F64 no_data=F64_MAX);
58-
virtual BOOL open(const CHAR* file_name, U8 point_type=0, const CHAR* parse_string=0, I32 skip_lines=0, BOOL populate_header=FALSE);
59-
virtual BOOL open(FILE* file, const CHAR* file_name=0, U8 point_type=0, const CHAR* parse_string=0, I32 skip_lines=0, BOOL populate_header=FALSE);
63+
I32 get_format() const { return LAS_TOOLS_FORMAT_TXT; };
6064

61-
I32 get_format() const { return LAS_TOOLS_FORMAT_TXT; };
65+
BOOL seek(const I64 p_index);
6266

63-
BOOL seek(const I64 p_index);
67+
ByteStreamIn* get_stream() const;
68+
void close(BOOL close_stream = TRUE);
69+
BOOL reopen(const CHAR* file_name);
6470

65-
ByteStreamIn* get_stream() const;
66-
void close(BOOL close_stream=TRUE);
67-
BOOL reopen(const CHAR* file_name);
68-
69-
LASreaderTXT();
70-
virtual ~LASreaderTXT();
71+
LASreaderTXT();
72+
virtual ~LASreaderTXT();
7173

7274
protected:
73-
BOOL read_point_default();
75+
BOOL read_point_default();
7476

7577
private:
76-
U8 point_type;
77-
CHAR* parse_string;
78-
F32 translate_intensity;
79-
F32 scale_intensity;
80-
F32 translate_scan_angle;
81-
F32 scale_scan_angle;
82-
F64* scale_factor;
83-
F64* offset;
84-
I32 skip_lines;
85-
BOOL populated_header;
86-
BOOL ipts;
87-
BOOL iptx;
88-
FILE* file;
89-
bool piped;
90-
CHAR line[512];
91-
I32 number_attributes;
92-
I32 attributes_data_types[32];
93-
const CHAR* attribute_names[32];
94-
const CHAR* attribute_descriptions[32];
95-
F64 attribute_scales[32];
96-
F64 attribute_offsets[32];
97-
F64 attribute_pre_scales[32];
98-
F64 attribute_pre_offsets[32];
99-
F64 attribute_no_datas[32];
100-
I32 attribute_starts[32];
101-
BOOL parse_attribute(const CHAR* l, I32 index);
102-
BOOL parse(const CHAR* parse_string);
103-
BOOL check_parse_string(const CHAR* parse_string);
104-
void populate_scale_and_offset();
105-
void populate_bounding_box();
106-
void clean();
78+
U8 point_type;
79+
CHAR* parse_string;
80+
F32 translate_intensity;
81+
F32 scale_intensity;
82+
F32 translate_scan_angle;
83+
F32 scale_scan_angle;
84+
F64* scale_factor;
85+
F64* offset;
86+
I32 skip_lines;
87+
BOOL populated_header;
88+
BOOL ipts;
89+
BOOL iptx;
90+
FILE* file;
91+
bool piped;
92+
CHAR line[512];
93+
I32 number_attributes;
94+
I32 attributes_data_types[32];
95+
const CHAR* attribute_names[32];
96+
const CHAR* attribute_descriptions[32];
97+
F64 attribute_scales[32];
98+
F64 attribute_offsets[32];
99+
F64 attribute_pre_scales[32];
100+
F64 attribute_pre_offsets[32];
101+
F64 attribute_no_datas[32];
102+
I32 attribute_starts[32];
103+
BOOL parse_attribute(const CHAR* l, I32 index);
104+
BOOL parse(const CHAR* parse_string);
105+
BOOL check_parse_string(const CHAR* parse_string);
106+
void populate_scale_and_offset();
107+
void populate_bounding_box();
108+
void clean();
107109
};
108110

109111
class LASreaderTXTrescale : public virtual LASreaderTXT
110112
{
111113
public:
112-
virtual BOOL open(const CHAR* file_name, U8 point_type=0, const CHAR* parse_string=0, I32 skip_lines=0, BOOL populate_header=FALSE);
113-
LASreaderTXTrescale(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor);
114+
virtual BOOL open(const CHAR* file_name, U8 point_type = 0, const CHAR* parse_string = 0, I32 skip_lines = 0, BOOL populate_header = FALSE);
115+
LASreaderTXTrescale(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor);
114116

115117
protected:
116-
F64 scale_factor[3];
118+
F64 scale_factor[3];
117119
};
118120

119121
class LASreaderTXTreoffset : public virtual LASreaderTXT
120122
{
121123
public:
122-
virtual BOOL open(const CHAR* file_name, U8 point_type=0, const CHAR* parse_string=0, I32 skip_lines=0, BOOL populate_header=FALSE);
123-
LASreaderTXTreoffset(F64 x_offset, F64 y_offset, F64 z_offset);
124+
virtual BOOL open(const CHAR* file_name, U8 point_type = 0, const CHAR* parse_string = 0, I32 skip_lines = 0, BOOL populate_header = FALSE);
125+
LASreaderTXTreoffset(F64 x_offset, F64 y_offset, F64 z_offset);
124126
protected:
125-
F64 offset[3];
127+
F64 offset[3];
126128
};
127129

128130
class LASreaderTXTrescalereoffset : public LASreaderTXTrescale, LASreaderTXTreoffset
129131
{
130132
public:
131-
BOOL open(const CHAR* file_name, U8 point_type=0, const CHAR* parse_string=0, I32 skip_lines=0, BOOL populate_header=FALSE);
132-
LASreaderTXTrescalereoffset(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor, F64 x_offset, F64 y_offset, F64 z_offset);
133+
BOOL open(const CHAR* file_name, U8 point_type = 0, const CHAR* parse_string = 0, I32 skip_lines = 0, BOOL populate_header = FALSE);
134+
LASreaderTXTrescalereoffset(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor, F64 x_offset, F64 y_offset, F64 z_offset);
133135
};
134136

135137
#endif

0 commit comments

Comments
 (0)