lasreader_shp.hpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: lasreader_txt.hpp
5 
6  CONTENTS:
7 
8  Reads LIDAR points in LAS format through on-the-fly conversion from ASCII.
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  16 December 2011 -- after Silke got Australia mad and didn't call anymore
28 
29 ===============================================================================
30 */
31 #ifndef LAS_READER_SHP_HPP
32 #define LAS_READER_SHP_HPP
33 
34 #include "lasreader.hpp"
35 
36 #include <stdio.h>
37 
38 class LASreaderSHP : public LASreader
39 {
40 public:
41 
42  void set_scale_factor(const F64* scale_factor);
43  void set_offset(const F64* offset);
44  virtual BOOL open(const char* file_name);
45 
46  I32 get_format() const { return LAS_TOOLS_FORMAT_SHP; };
47 
48  BOOL seek(const I64 p_index);
49 
50  ByteStreamIn* get_stream() const;
51  void close(BOOL close_stream=TRUE);
52  BOOL reopen(const char* file_name);
53 
54  LASreaderSHP();
55  virtual ~LASreaderSHP();
56 
57 protected:
59 
60 private:
63  FILE* file;
69  bool piped;
71  void populate_bounding_box();
72  void clean();
73 };
74 
75 class LASreaderSHPrescale : public virtual LASreaderSHP
76 {
77 public:
78  virtual BOOL open(const char* file_name);
79  LASreaderSHPrescale(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor);
80 
81 protected:
83 };
84 
85 class LASreaderSHPreoffset : public virtual LASreaderSHP
86 {
87 public:
88  virtual BOOL open(const char* file_name);
89  LASreaderSHPreoffset(F64 x_offset, F64 y_offset, F64 z_offset);
90 protected:
91  F64 offset[3];
92 };
93 
95 {
96 public:
97  BOOL open(const char* file_name);
98  LASreaderSHPrescalereoffset(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor, F64 x_offset, F64 y_offset, F64 z_offset);
99 };
100 
101 #endif
int BOOL
Definition: mydefs.hpp:57
BOOL read_point_default()
BOOL seek(const I64 p_index)
void set_scale_factor(const F64 *scale_factor)
#define LAS_TOOLS_FORMAT_SHP
void populate_scale_and_offset()
I32 get_format() const
virtual ~LASreaderSHP()
void populate_bounding_box()
long long I64
Definition: mydefs.hpp:48
int I32
Definition: mydefs.hpp:35
virtual BOOL open(const char *file_name)
BOOL reopen(const char *file_name)
void set_offset(const F64 *offset)
#define TRUE
Definition: mydefs.hpp:137
ByteStreamIn * get_stream() const
void close(BOOL close_stream=TRUE)
double F64
Definition: mydefs.hpp:52


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