3 #include <filems/write/comps/MultiSyncFileWriter.h>
4 #include <filems/util/LasWriterSpec.h>
6 #include <laswriter.hpp>
11 namespace helios {
namespace filems{
14 using std::shared_ptr;
23 template <
typename ... WriteArgs>
31 vector<LasWriterSpec>
lws;
35 vector<shared_ptr<LASwriter>>
lw;
52 vector<string>
const &
path,
54 vector<double>
const &scaleFactor,
55 vector<glm::dvec3>
const &offset,
56 vector<double>
const &minIntensity,
57 vector<double>
const &deltaIntensity,
58 bool const createWriters =
true
64 size_t nWriters =
path.size();
65 for(
size_t i = 0 ; i < nWriters ; ++i){
92 size_t const nWriters =
path.size();
93 for(
size_t i = 0 ; i < nWriters ; ++i){
95 string const &
path = this->path[i];
100 lws.addExtraAttributes();
104 lw.push_back(
lws.makeWriter(
path, compress));
128 size_t const nWriters =
lw.size();
129 for(
size_t i = 0 ; i < nWriters ; ++i){
131 shared_ptr<LASwriter>
lw = this->lw[i];
134 lw->update_header(&
lws.lwHeader,
true);
Class representing the specification defining a LasWriter (not the writer itself)
Definition: LasWriterSpec.h:23
Abstract specialization of MultiSyncFileWriter to write output in LAS format.
Definition: MultiLasSyncFileWriter.h:24
MultiLasSyncFileWriter(vector< string > const &path, bool const compress, vector< double > const &scaleFactor, vector< glm::dvec3 > const &offset, vector< double > const &minIntensity, vector< double > const &deltaIntensity, bool const createWriters=true)
Constructor for Synchronous Multi LAS file writer.
Definition: MultiLasSyncFileWriter.h:51
virtual void craftSpec(LasWriterSpec &lws)
Assist the MultiLasSyncFileWriter::createLasWriters method by crafting the given specification.
Definition: MultiLasSyncFileWriter.h:112
vector< shared_ptr< LASwriter > > lw
The LASwriter used to write to each LAS file.
Definition: MultiLasSyncFileWriter.h:35
void finish() override
MultiLasSyncFileWriter updates each header and guarantees all writings have been done only after the ...
Definition: MultiLasSyncFileWriter.h:125
void createLasWriters(vector< string > const &path, bool const compress)
Creation of each LasWriter , including LASpoint initialization.
Definition: MultiLasSyncFileWriter.h:90
bool finished
Flag used to control the sync writer status.
Definition: MultiLasSyncFileWriter.h:39
MultiLasSyncFileWriter()
Default constructor for Synchronous Multi LAS file writer.
Definition: MultiLasSyncFileWriter.h:47
vector< LasWriterSpec > lws
The specifications defining each LAS writer.
Definition: MultiLasSyncFileWriter.h:31
Abstract class defining common behavior for all synchronous writers that work with multiple files at ...
Definition: MultiSyncFileWriter.h:21
std::vector< std::string > path
Paths to the files to be written.
Definition: MultiSyncFileWriter.h:28