3 #include <helios_version.h>
5 #include <laswriter.hpp>
11 namespace helios {
namespace filems{
144 glm::dvec3
const offset = glm::dvec3(0, 0, 0),
184 std::stringstream ss;
191 ss <<
"HELIOS++V" << HELIOS_VERSION;
192 std::string ssStr = ss.str();
193 size_t n = ssStr.length();
200 lwHeader.generating_software[n] = 0;
204 time_t now = time(0);
205 tm *gmtm = gmtime(&now);
206 lwHeader.file_creation_day = gmtm->tm_yday;
207 lwHeader.file_creation_year = 1900 + gmtm->tm_year;
209 lwHeader.point_data_record_length = 28;
230 lwHeader.point_data_record_length = 50;
236 lwHeader.offset_to_point_data += 148;
258 "Helios++ echo width"
260 LASattribute fwiAttr(
263 "Helios++ fullwave index"
265 LASattribute hoiAttr(
268 "Helios++ hit object ID"
270 LASattribute ampAttr(
280 catch(std::exception &e){
281 std::stringstream ss;
282 ss <<
"LasSyncFileWriter failed.\n\tEXCEPTION: "
284 logging::WARN(ss.str());
316 std::string
const &path,
bool const compress
319 lwOpener.set_file_name(path.c_str());
320 if(compress)
lwOpener.set_format(LAS_TOOLS_FORMAT_LAZ);
321 else lwOpener.set_format(LAS_TOOLS_FORMAT_LAS);
Class representing the specification defining a LasWriter (not the writer itself)
Definition: LasWriterSpec.h:23
LASheader lwHeader
Header definition for the LAS file.
Definition: LasWriterSpec.h:34
void craft14()
Craft the header of the LAS File for version 1.4.
Definition: LasWriterSpec.h:221
LASpoint lp
LASpoint used to build different points which shall be written to LAS output file.
Definition: LasWriterSpec.h:39
void addExtraAttributes()
Creation of extra attributes to be added to each record.
Definition: LasWriterSpec.h:244
double deltaIntensity
The difference between max and min intensity.
Definition: LasWriterSpec.h:81
void initLASPoint()
Initialize the LAS point structure with data from header.
Definition: LasWriterSpec.h:300
I32 fwiAttrIdx
Index of full wave index attribute in LAS header definition.
Definition: LasWriterSpec.h:100
double maxIntensity
Maximum value for intensity. Values greater than this will be clipped to maxIntensity.
Definition: LasWriterSpec.h:73
I32 ampAttrStart
Helios amplitude attribute start (LAS extra bytes format)
Definition: LasWriterSpec.h:124
I32 ewAttrIdx
Index of echo width attribute in LAS header definition.
Definition: LasWriterSpec.h:96
I32 hoiAttrIdx
Index of hit object ID attribute in LAS header definition.
Definition: LasWriterSpec.h:104
glm::dvec3 offset
Offset for coordinates.
Definition: LasWriterSpec.h:63
I32 fwiAttrStart
Full wave index attribute start (LAS extra bytes format)
Definition: LasWriterSpec.h:116
I32 hoiAttrStart
Hit object ID attribute start (LAS extra bytes format)
Definition: LasWriterSpec.h:120
double scaleFactor
Scale factor for coordinates.
Definition: LasWriterSpec.h:47
I32 ewAttrStart
Echo width attribute start (LAS extra bytes format)
Definition: LasWriterSpec.h:112
void craft()
Craft the header of the LAS File for version 1.0.
Definition: LasWriterSpec.h:182
void finish()
Remove and release everything that has been initialized in the process of building the writer from th...
Definition: LasWriterSpec.h:332
double scaleFactorInverse
Inverse of the scale factor.
Definition: LasWriterSpec.h:55
double intensityCoefficient
Precomputed intensity coefficient.
Definition: LasWriterSpec.h:92
shared_ptr< LASwriter > makeWriter(std::string const &path, bool const compress)
Build a LAS writer from this specification.
Definition: LasWriterSpec.h:315
LasWriterSpec(const string &path, double const scaleFactor=0.0001, glm::dvec3 const offset=glm::dvec3(0, 0, 0), double const minIntensity=0.0, double const deltaIntensity=1000000.0)
LAS writer specification constructor.
Definition: LasWriterSpec.h:141
double minIntensity
Minimum value for intensity. Values less than this will be clipped to minIntensity.
Definition: LasWriterSpec.h:68
LasWriterSpec()=default
Default constructor for LasWriterSpec.
LASwriteOpener lwOpener
LASwriter opener. Used to instantiate LASwriter lw.
Definition: LasWriterSpec.h:30
I32 ampAttrIdx
Index of helios amplitude attribute in LAS header definition.
Definition: LasWriterSpec.h:108
LasWriterSpec(LasWriterSpec const &lws)
Copy constructor. It must be overridden to prevent segmentation fault when copying the LAS attributes...
Definition: LasWriterSpec.h:158