1 /* 2 =============================================================================== 3 4 FILE: lasreaderstored.hpp 5 6 CONTENTS: 7 8 Reads LiDAR points from another LASreader and stores them in compressed form 9 so they can be read from memory on the second read. This is especially used 10 for piping LiDAR from one process to another for those modules that perform 11 two reading passes over the input. 12 13 PROGRAMMERS: 14 15 martin.isenburg@rapidlasso.com - http://rapidlasso.com 16 17 COPYRIGHT: 18 19 (c) 2007-2017, martin isenburg, rapidlasso - fast tools to catch reality 20 21 This is free software; you can redistribute and/or modify it under the 22 terms of the GNU Lesser General Licence as published by the Free Software 23 Foundation. See the LICENSE.txt file for more information. 24 25 This software is distributed WITHOUT ANY WARRANTY and without even the 26 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 27 28 CHANGE HISTORY: 29 30 9 December 2017 -- created at Octopus Resort on Waya Island in Fiji 31 32 =============================================================================== 33 */ 34 #ifndef LAS_READER_STORED_HPP 35 #define LAS_READER_STORED_HPP 36 37 #include "lasreader.hpp" 38 #include "laswriter.hpp" 39 #include "bytestreamin_array.hpp" 40 #include "bytestreamout_array.hpp" 41 42 class LASreaderStored : public LASreader 43 { 44 public: 45 46 BOOL open(LASreader* lasreader); 47 BOOL reopen(); get_lasreader() const48 LASreader* get_lasreader() const { return lasreader; }; 49 50 I32 get_format() const; 51 52 void set_index(LASindex* index); 53 LASindex* get_index() const; 54 void set_filter(LASfilter* filter); 55 void set_transform(LAStransform* transform); 56 57 BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size); 58 BOOL inside_circle(const F64 center_x, const F64 center_y, const F64 radius); 59 BOOL inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y); 60 seek(const I64 p_index)61 BOOL seek(const I64 p_index){ return FALSE; }; 62 get_stream() const63 ByteStreamIn* get_stream() const { return 0; }; 64 void close(BOOL close_stream=TRUE); 65 66 LASreaderStored(); 67 ~LASreaderStored(); 68 69 protected: 70 BOOL read_point_default(); 71 72 private: 73 LASreader* lasreader; 74 LASwriter* laswriter; 75 ByteStreamInArray* streaminarray; 76 ByteStreamOutArray* streamoutarray; 77 }; 78 79 #endif 80