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
LASheader
Definition: lasdefinitions.hpp:952
LASwriterLAS
Definition: laswriter_las.hpp:55
LASZIP_COMPRESSOR_NONE
#define LASZIP_COMPRESSOR_NONE
Definition: laszip.hpp:53
LASpoint
Definition: lasdefinitions.hpp:472
I64
long long I64
Definition: mydefs.hpp:48
I32
int I32
Definition: mydefs.hpp:35
TRUE
#define TRUE
Definition: mydefs.hpp:137
LASwriterLAS::writer
LASwritePoint * writer
Definition: laswriter_las.hpp:78
LASwriter
Definition: laswriter.hpp:47
laswriter.hpp
ByteStreamOut
Definition: bytestreamout.hpp:36
BOOL
int BOOL
Definition: mydefs.hpp:57
LASwritePoint
Definition: laswritepoint.hpp:48
FALSE
#define FALSE
Definition: mydefs.hpp:133
file
FILE * file
Definition: arithmeticencoder.cpp:77
std
Definition: HalfEdge.hpp:124
U32
unsigned int U32
Definition: mydefs.hpp:39
LASwriterLAS::file
FILE * file
Definition: laswriter_las.hpp:79
LASwriterLAS::header_start_position
I64 header_start_position
Definition: laswriter_las.hpp:80
LASwriterLAS::stream
ByteStreamOut * stream
Definition: laswriter_las.hpp:77
lvr2::hdf5util::open
std::shared_ptr< HighFive::File > open(const std::string &filename)
Definition: Hdf5Util.cpp:202


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