Go to the documentation of this file.
   44 #ifndef LAS_DEFINITIONS_HPP 
   45 #define LAS_DEFINITIONS_HPP 
   47 #define LAS_TOOLS_VERSION 111229 
   57 #define LAS_TOOLS_FORMAT_DEFAULT 0 
   58 #define LAS_TOOLS_FORMAT_LAS     1 
   59 #define LAS_TOOLS_FORMAT_LAZ     2 
   60 #define LAS_TOOLS_FORMAT_BIN     3 
   61 #define LAS_TOOLS_FORMAT_SHP     4 
   62 #define LAS_TOOLS_FORMAT_QFIT    5 
   63 #define LAS_TOOLS_FORMAT_TXT     6 
  122     this->x_offset = quantizer.
x_offset;
 
  123     this->y_offset = quantizer.
y_offset;
 
  124     this->z_offset = quantizer.
z_offset;
 
  129 #define LAS_ATTRIBUTE_U8  0 
  130 #define LAS_ATTRIBUTE_I8  1 
  131 #define LAS_ATTRIBUTE_U16 2 
  132 #define LAS_ATTRIBUTE_I16 3 
  133 #define LAS_ATTRIBUTE_U32 4 
  134 #define LAS_ATTRIBUTE_I32 5 
  135 #define LAS_ATTRIBUTE_U64 6 
  136 #define LAS_ATTRIBUTE_I64 7 
  137 #define LAS_ATTRIBUTE_F32 8 
  138 #define LAS_ATTRIBUTE_F64 9 
  157     if (size == 0) 
throw;
 
  160     this->options = size;
 
  166     if (dim < 1 || dim > 3) 
throw;
 
  167     if (
name == 0) 
throw;
 
  170     this->data_type = type*dim+1;
 
  171     strncpy(this->name, 
name, 32);
 
  225       const U32 size_table[10] = { 1, 1, 2, 2, 4, 4, 8, 8, 4, 8 };
 
  228       return size_table[type]*dim;
 
  250       casted_value.
u64 = *((
U8*)value);
 
  252       casted_value.
i64 = *((
I8*)value);
 
  254       casted_value.
u64 = *((
U16*)value);
 
  256       casted_value.
i64 = *((
I16*)value);
 
  258       casted_value.
u64 = *((
U32*)value);
 
  260       casted_value.
i64 = *((
I32*)value);
 
  262       casted_value.
u64 = *((
U64*)value);
 
  264       casted_value.
i64 = *((
I64*)value);
 
  266       casted_value.
f64 = *((
F32*)value);
 
  268       casted_value.
f64 = *((
F64*)value);
 
  276       if (a.
f64 < b.
f64) 
return a;
 
  281       if (a.
i64 < b.
i64) 
return a;
 
  284     if (a.
u64 < b.
u64) 
return a;
 
  292       if (a.
f64 > b.
f64) 
return a;
 
  297       if (a.
i64 > b.
i64) 
return a;
 
  300     if (a.
u64 > b.
u64) 
return a;
 
  605       fprintf(stderr,
"ERROR: unknown point type %d with point size %d\n", (
I32)point_type, (
I32)point_size);
 
  617       switch (
items[i].type)
 
  622         this->point[i] = (
U8*)&(this->x);
 
  626         this->point[i] = (
U8*)&(this->gps_time);
 
  631         this->point[i] = (
U8*)(this->rgb);
 
  635         this->point[i] = (
U8*)&(this->wavepacket);
 
  662     if (this->items) 
delete [] this->
items;
 
  664     if (this->point) 
delete [] this->
point;
 
  669       this->items[i] = 
items[i];
 
  672       switch (
items[i].type)
 
  675         this->point[i] = (
U8*)&(this->x);
 
  679         this->point[i] = (
U8*)&(this->gps_time);
 
  683         this->point[i] = (
U8*)(this->rgb);
 
  687         this->point[i] = (
U8*)&(this->wavepacket);
 
  707     if (xy < r_min_x || xy > r_max_x) 
return FALSE;
 
  709     if (xy < r_min_y || xy > r_max_y) 
return FALSE;
 
  717     if (xy < ll_x || xy >= ur_x) 
return FALSE;
 
  719     if (xy < ll_y || xy >= ur_y) 
return FALSE;
 
  727     return ((dx*dx+dy*dy) < squared_radius);
 
  732     if (((
U32*)&(this->x))[0] || ((
U32*)&(this->x))[1] || ((
U32*)&(this->x))[2] || ((
U32*)&(this->x))[3] || ((
U32*)&(this->x))[4])
 
  745       if (this->rgb[0] || this->rgb[1] || this->rgb[2])
 
 1017     memset((
void*)
this, 0, 
sizeof(
LASheader));
 
 1121       fprintf(stderr,
"ERROR: wrong file signature '%s'\n", 
file_signature);
 
 1126       fprintf(stderr,
"WARNING: unknown version %d.%d (should be 1.0 or 1.1 or 1.2 or 1.3 or 1.4)\n", 
version_major, 
version_minor);
 
 1130       fprintf(stderr,
"ERROR: header size is %d but should be at least 227\n", 
header_size);
 
 1140       fprintf(stderr,
"WARNING: x scale factor is zero.\n");
 
 1144       fprintf(stderr,
"WARNING: y scale factor is zero.\n");
 
 1148       fprintf(stderr,
"WARNING: z scale factor is zero.\n");
 
 1157   void add_vlr(
const char* user_id, 
U16 record_id, 
U16 record_length_after_header, 
char* data)
 
 1164         if ((strcmp(
vlrs[i].user_id, user_id) == 0) && (
vlrs[i].record_id == record_id))
 
 1166           if (
vlrs[i].record_length_after_header)
 
 1188     strncpy(
vlrs[i].user_id, user_id, 16);
 
 1191     sprintf(
vlrs[i].description, 
"by LAStools of Martin Isenburg");
 
 1192     if (record_length_after_header)
 
 1210         if (
vlrs[i].record_length_after_header)
 
 1236       if ((strcmp(
vlrs[i].user_id, user_id) == 0) && (
vlrs[i].record_id == record_id))
 
 1301       char* data = 
new char[record_length_after_header];
 
 1303       add_vlr(
"LASF_Spec", 4, record_length_after_header, data);
 
  
I32 get_z(const F64 z) const
BOOL init(const LASquantizer *quantizer, const U32 num_items, const LASitem *items, const LASattributer *attributer=0)
void setBitsPerSample(U8 bps)
BOOL set_max(U8 max, I32 dim=0)
BOOL set_no_data(I32 no_data, I32 dim=0)
void set_extra_attribute(I32 offset, U8 data)
void setOffset(U64 offset)
F64 get_y(const I32 y) const
BOOL set_max(I8 max, I32 dim=0)
I32 get_y(const F64 y) const
I32 get_x(const F64 x) const
void set_extra_attribute(I32 offset, I32 data)
BOOL set_max(U16 max, I32 dim=0)
BOOL set_no_data(U32 no_data, I32 dim=0)
BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 ur_x, const F32 ur_y) const
void update_min(U8 *min, I32 dim=0)
void copy_to(U8 *buffer) const
BOOL set_max(I64 max, I32 dim=0)
void get_extra_attribute(I32 offset, I64 &data) const
void set_min(U8 *min, I32 dim=0)
void clean_extra_attributes()
BOOL set_offset(F64 offset, I32 dim=0)
void set_extra_attribute(I32 offset, F32 data)
I32 get_extra_attribute_array_offset(const char *name) const
U8 extended_return_number
F64 get_z(const I32 z) const
LASpoint & operator=(const LASpoint &other)
void update_max(U8 *max, I32 dim=0)
U8 extended_scanner_channel
LASvlr_wave_packet_descr()
const LASquantizer * quantizer
I32 * extra_attribute_array_offsets
void get_extra_attribute(I32 offset, F64 &data) const
BOOL remove_extra_attribute(I32 index)
BOOL set_min(I16 min, I32 dim=0)
LASpoint(const LASpoint &other)
void get_extra_attribute(I32 offset, U32 &data) const
void get_extra_attribute(I32 offset, I8 &data) const
BOOL set_max(F64 max, I32 dim=0)
BOOL set_max(U32 max, I32 dim=0)
BOOL remove_extra_attribute(const char *name)
I32 number_extra_attributes
void setNumberOfSamples(U32 samples)
BOOL set_min(I8 min, I32 dim=0)
void get_extra_attribute(I32 offset, U64 &data) const
BOOL set_no_data(F32 no_data, I32 dim=0)
void get_extra_attribute(I32 offset, I32 &data) const
BOOL set_no_data(I8 no_data, I32 dim=0)
U32 getTemporalSpacing() const
void set_max(U8 *max, I32 dim=0)
void setDigitizerGain(F64 gain)
BOOL set_max(U64 max, I32 dim=0)
BOOL set_min(U64 min, I32 dim=0)
BOOL inside_circle(const F64 center_x, const F64 center_y, F64 squared_radius) const
BOOL set_no_data(U8 no_data, I32 dim=0)
BOOL set_min(I32 min, I32 dim=0)
void get_extra_attribute(I32 index, U8 *data) const
I32 add_extra_attribute(const LASattribute extra_attribute)
void set_extra_attribute(I32 index, const U8 *data)
void set_extra_attribute(I32 offset, I16 data)
U8 extended_classification
const LASattributer * attributer
U64I64F64 cast(U8 *value) const
void set_extra_attribute(I32 offset, U64 data)
I32 get_extra_attribute_index(const char *name) const
F64 getDigitizerGain() const
void copy_from(const U8 *buffer)
BOOL set_no_data(U16 no_data, I32 dim=0)
BOOL set_no_data(F64 no_data, I32 dim=0)
BOOL set_min(I64 min, I32 dim=0)
U64I64F64 smallest(U64I64F64 a, U64I64F64 b) const
BOOL set_no_data(I16 no_data, I32 dim=0)
BOOL inside_rectangle(const F64 r_min_x, const F64 r_min_y, const F64 r_max_x, const F64 r_max_y) const
BOOL set_scale(F64 scale, I32 dim=0)
U8 getCompressionType() const
void set_extra_attribute(I32 offset, U32 data)
F64 getDigitizerOffset() const
BOOL set_max(I16 max, I32 dim=0)
I32 get_extra_attribute_array_offset(I32 index) const
U64I64F64 biggest(U64I64F64 a, U64I64F64 b) const
void get_extra_attribute(I32 offset, U8 &data) const
BOOL set_min(F64 min, I32 dim=0)
void setLocation(F32 location)
void compute_xyz(const LASquantizer *quantizer)
void set_extra_attribute(I32 offset, I8 data)
U16 record_length_after_header
U16 key_directory_version
LASattribute(U32 type, const char *name, const char *description=0, U32 dim=1)
void setCompressionType(U8 compression)
void set_extra_attribute(I32 offset, I64 data)
BOOL init_extra_attributes(U32 number_extra_attributes, LASattribute *extra_attributes)
BOOL set_max(I32 max, I32 dim=0)
U8 number_of_returns_of_given_pulse
void get_extra_attribute(I32 offset, U16 &data) const
void set_extra_attribute(I32 offset, F64 data)
BOOL init(const LASquantizer *quantizer, const U8 point_type, const U16 point_size, const LASattributer *attributer=0)
I32 * extra_attribute_sizes
void get_extra_attribute(I32 offset, I16 &data) const
BOOL set_no_data(U64 no_data, I32 dim=0)
BOOL set_no_data(I64 no_data, I32 dim=0)
BOOL set_min(U8 min, I32 dim=0)
I16 get_total_extra_attributes_size() const
U32 getNumberOfSamples() const
F64 get_x(const I32 x) const
U8 extended_number_of_returns_of_given_pulse
LASattribute * extra_attributes
BOOL set_min(U16 min, I32 dim=0)
BOOL set_max(F32 max, I32 dim=0)
void compute_coordinates()
#define LAS_ATTRIBUTE_F64
BOOL set_min(U32 min, I32 dim=0)
void set_extra_attribute(I32 offset, U16 data)
U8 getBitsPerSample() const
void get_extra_attribute(I32 offset, F32 &data) const
LASquantizer & operator=(const LASquantizer &quantizer)
BOOL set_min(F32 min, I32 dim=0)
void setDigitizerOffset(F64 offset)
void setTemporalSpacing(U32 spacing)
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