laswriter_las.hpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: laswriter_las.hpp
5 
6  CONTENTS:
7 
8  Writes LIDAR points to the LAS format (Version 1.x , April 29, 2008).
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  5 November 2011 -- changed default IO buffer size with setvbuf() to 65536
28  8 May 2011 -- added an option for variable chunking via chunk()
29  23 April 2011 -- added additional open parameters to support chunking
30  21 January 2011 -- adapted from laswriter to create abstract reader class
31  3 December 2010 -- updated to (somewhat) support LAS format 1.3
32  7 September 2008 -- updated to support LAS format 1.2
33  21 February 2007 -- created after eating Sarah's veggies with peanutsauce
34 
35 ===============================================================================
36 */
37 #ifndef LAS_WRITER_LAS_HPP
38 #define LAS_WRITER_LAS_HPP
39 
40 #include "laswriter.hpp"
41 
42 #include <stdio.h>
43 
44 #ifdef LZ_WIN32_VC6
45 #include <fstream.h>
46 #else
47 #include <istream>
48 #include <fstream>
49 using namespace std;
50 #endif
51 
52 class ByteStreamOut;
53 class LASwritePoint;
54 
55 class LASwriterLAS : public LASwriter
56 {
57 public:
58 
59  BOOL refile(FILE* file);
60 
61  BOOL open(const LASheader* header, U32 compressor=LASZIP_COMPRESSOR_NONE, I32 requested_version=0, I32 chunk_size=50000);
62  BOOL open(const char* file_name, const LASheader* header, U32 compressor=LASZIP_COMPRESSOR_NONE, I32 requested_version=0, I32 chunk_size=50000, U32 io_buffer_size=65536);
63  BOOL open(FILE* file, const LASheader* header, U32 compressor=LASZIP_COMPRESSOR_NONE, I32 requested_version=0, I32 chunk_size=50000);
64  BOOL open(ostream& ostream, const LASheader* header, U32 compressor=LASZIP_COMPRESSOR_NONE, I32 requested_version=0, I32 chunk_size=50000);
65 
66  BOOL write_point(const LASpoint* point);
67  BOOL chunk();
68 
69  BOOL update_header(const LASheader* header, BOOL use_inventory=TRUE, BOOL update_extra_bytes=FALSE);
70  I64 close(BOOL update_npoints=true);
71 
72  LASwriterLAS();
73  ~LASwriterLAS();
74 
75 private:
76  BOOL open(ByteStreamOut* stream, const LASheader* header, U32 compressor, I32 requested_version, I32 chunk_size);
79  FILE* file;
81 };
82 
83 #endif
int BOOL
Definition: mydefs.hpp:57
#define FALSE
Definition: mydefs.hpp:133
unsigned int U32
Definition: mydefs.hpp:39
long long I64
Definition: mydefs.hpp:48
I64 header_start_position
#define LASZIP_COMPRESSOR_NONE
Definition: laszip.hpp:53
FILE * file
int I32
Definition: mydefs.hpp:35
LASwritePoint * writer
#define TRUE
Definition: mydefs.hpp:137
std::shared_ptr< HighFive::File > open(const std::string &filename)
Definition: Hdf5Util.cpp:202
ByteStreamOut * stream


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