Helios++
Helios software for LiDAR simulations
Las14SyncFileMeasurementWriter.h
1 #pragma once
2 
3 // Includes
4 #include <string>
5 #include <filems/write/comps/LasSyncFileMeasurementWriter.h>
6 
7 namespace helios { namespace filems {
8 
9 using std::make_shared;
10 
17 {
18 public:
19 
20  // *** CONSTRUCTION / DESTRUCTION *** //
21  // ************************************ //
31  const std::string &path,
32  bool compress = false,
33  double scaleFactor = 0.0001,
34  glm::dvec3 offset = glm::dvec3(0, 0, 0),
35  double minIntensity = 0.0,
36  double deltaIntensity = 1000000.0
37  ) :
39  path,
40  compress,
41  scaleFactor,
42  offset,
43  minIntensity,
44  deltaIntensity,
45  false // Prevent parent from creating LAS writer
46  )
47  {};
48  virtual ~Las14SyncFileMeasurementWriter() = default;
49 
50  // *** CREATE WRITER *** //
51  // *********************** //
59  void createLasWriter(string const &path, bool const compress) override
60  {
61  // Craft header and point format for LAS_14 version
62  lws.craft14();
63 
64  // Add extra attributes
66 
67  // Initialize LASpoint
68  lws.initLASPoint();
69 
70  // Create writer from specification
71  lw = lws.makeWriter(path, compress);
72  }
73 
74 
75 };
76 
77 }}
LasSyncFileWriter implementation for LAS v1.4 format.
Definition: Las14SyncFileMeasurementWriter.h:17
void createLasWriter(string const &path, bool const compress) override
Creation of the LasWriter itself, including LASpoint initialization but using LAS14 version instead o...
Definition: Las14SyncFileMeasurementWriter.h:59
Las14SyncFileMeasurementWriter(const std::string &path, bool compress=false, double scaleFactor=0.0001, glm::dvec3 offset=glm::dvec3(0, 0, 0), double minIntensity=0.0, double deltaIntensity=1000000.0)
Constructor for the LAS-1.4 synchronous file measurement writer.
Definition: Las14SyncFileMeasurementWriter.h:30
Las14SyncFileMeasurementWriter()
Default constructor for the LAS-1.4 synchronous file measurement writer.
Definition: Las14SyncFileMeasurementWriter.h:26
SyncFileWriter implementation to write measurements in LAS format.
Definition: LasSyncFileMeasurementWriter.h:24
LasWriterSpec lws
The specification defining the LAS writer.
Definition: LasSyncFileWriter.h:30
std::shared_ptr< LASwriter > lw
LASwriter. Used to write to LAS file.
Definition: LasSyncFileWriter.h:34
void craft14()
Craft the header of the LAS File for version 1.4.
Definition: LasWriterSpec.h:221
void addExtraAttributes()
Creation of extra attributes to be added to each record.
Definition: LasWriterSpec.h:244
void initLASPoint()
Initialize the LAS point structure with data from header.
Definition: LasWriterSpec.h:300
shared_ptr< LASwriter > makeWriter(std::string const &path, bool const compress)
Build a LAS writer from this specification.
Definition: LasWriterSpec.h:315
std::string path
Path to file to be written.
Definition: SingleSyncFileWriter.h:28