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
LASreaderSHPreoffset::LASreaderSHPreoffset
LASreaderSHPreoffset(F64 x_offset, F64 y_offset, F64 z_offset)
Definition: lasreader_shp.cpp:651
LASreaderSHP::point_count
I32 point_count
Definition: lasreader_shp.hpp:68
LASreaderSHP::offset
F64 * offset
Definition: lasreader_shp.hpp:62
LASreaderSHPrescale::open
virtual BOOL open(const char *file_name)
Definition: lasreader_shp.cpp:632
LASreaderSHP::points_allocated
I32 points_allocated
Definition: lasreader_shp.hpp:66
LASreaderSHP
Definition: lasreader_shp.hpp:38
LASreaderSHP::shape_type
I32 shape_type
Definition: lasreader_shp.hpp:64
LASreaderSHPreoffset::open
virtual BOOL open(const char *file_name)
Definition: lasreader_shp.cpp:658
LASreaderSHP::seek
BOOL seek(const I64 p_index)
Definition: lasreader_shp.cpp:289
LAS_TOOLS_FORMAT_SHP
#define LAS_TOOLS_FORMAT_SHP
Definition: lasdefinitions.hpp:61
LASreaderSHP::file
FILE * file
Definition: lasreader_shp.hpp:63
lasreader.hpp
LASreaderSHP::populate_scale_and_offset
void populate_scale_and_offset()
Definition: lasreader_shp.cpp:508
I64
long long I64
Definition: mydefs.hpp:48
F64
double F64
Definition: mydefs.hpp:52
I32
int I32
Definition: mydefs.hpp:35
TRUE
#define TRUE
Definition: mydefs.hpp:137
LASreaderSHP::get_format
I32 get_format() const
Definition: lasreader_shp.hpp:46
LASreaderSHP::points
I32 * points
Definition: lasreader_shp.hpp:65
LASreaderSHP::populate_bounding_box
void populate_bounding_box()
Definition: lasreader_shp.cpp:556
LASreaderSHP::~LASreaderSHP
virtual ~LASreaderSHP()
Definition: lasreader_shp.cpp:488
LASreaderSHP::set_offset
void set_offset(const F64 *offset)
Definition: lasreader_shp.cpp:273
LASreaderSHPrescale
Definition: lasreader_shp.hpp:75
LASreaderSHP::get_stream
ByteStreamIn * get_stream() const
Definition: lasreader_shp.cpp:404
LASreader
Definition: lasreader.hpp:49
LASreaderSHPrescalereoffset::open
BOOL open(const char *file_name)
Definition: lasreader_shp.cpp:681
LASreaderSHP::LASreaderSHP
LASreaderSHP()
Definition: lasreader_shp.cpp:473
ByteStreamIn
Definition: bytestreamin.hpp:36
LASreaderSHP::piped
bool piped
Definition: lasreader_shp.hpp:69
LASreaderSHP::read_point_default
BOOL read_point_default()
Definition: lasreader_shp.cpp:294
BOOL
int BOOL
Definition: mydefs.hpp:57
LASreaderSHPrescale::scale_factor
F64 scale_factor[3]
Definition: lasreader_shp.hpp:82
LASreaderSHP::reopen
BOOL reopen(const char *file_name)
Definition: lasreader_shp.cpp:419
LASreaderSHPrescalereoffset
Definition: lasreader_shp.hpp:94
LASreaderSHPrescale::LASreaderSHPrescale
LASreaderSHPrescale(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor)
Definition: lasreader_shp.cpp:625
LASreaderSHPrescalereoffset::LASreaderSHPrescalereoffset
LASreaderSHPrescalereoffset(F64 x_scale_factor, F64 y_scale_factor, F64 z_scale_factor, F64 x_offset, F64 y_offset, F64 z_offset)
Definition: lasreader_shp.cpp:677
LASreaderSHP::clean
void clean()
Definition: lasreader_shp.cpp:461
LASreaderSHP::set_scale_factor
void set_scale_factor(const F64 *scale_factor)
Definition: lasreader_shp.cpp:257
LASreaderSHP::open
virtual BOOL open(const char *file_name)
Definition: lasreader_shp.cpp:104
LASreaderSHPreoffset
Definition: lasreader_shp.hpp:85
LASreaderSHP::number_of_points
I32 number_of_points
Definition: lasreader_shp.hpp:67
LASreaderSHP::close
void close(BOOL close_stream=TRUE)
Definition: lasreader_shp.cpp:409
LASreaderSHPreoffset::offset
F64 offset[3]
Definition: lasreader_shp.hpp:91
LASreaderSHP::scale_factor
F64 * scale_factor
Definition: lasreader_shp.hpp:61


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 Wed Mar 2 2022 00:37:23