Go to the documentation of this file.
44 fprintf(stderr,
"ERROR: file name pointer is NULL\n");
48 FILE*
file = fopen(file_name,
"r");
51 fprintf(stderr,
"ERROR: file '%s' cannot be opened\n", file_name);
56 if (strstr(file_name,
".las") || strstr(file_name,
".laz") || strstr(file_name,
".LAS") || strstr(file_name,
".LAZ"))
60 fprintf(stderr,
"ERROR: cannot mix BIN with LAS. skipping '%s' ...\n", file_name);
65 fprintf(stderr,
"ERROR: cannot mix SHP with LAS. skipping '%s' ...\n", file_name);
70 fprintf(stderr,
"ERROR: cannot mix QFIT with LAS. skipping '%s' ...\n", file_name);
75 fprintf(stderr,
"ERROR: cannot mix TXT with LAS. skipping '%s' ...\n", file_name);
83 else if (strstr(file_name,
".bin") || strstr(file_name,
".BIN"))
87 fprintf(stderr,
"ERROR: cannot mix LAS with BIN. skipping '%s' ...\n", file_name);
92 fprintf(stderr,
"ERROR: cannot mix SHP with BIN. skipping '%s' ...\n", file_name);
97 fprintf(stderr,
"ERROR: cannot mix QFIT with BIN. skipping '%s' ...\n", file_name);
102 fprintf(stderr,
"ERROR: cannot mix TXT with BIN. skipping '%s' ...\n", file_name);
110 else if (strstr(file_name,
".shp") || strstr(file_name,
".SHP"))
114 fprintf(stderr,
"ERROR: cannot mix LAS with SHP. skipping '%s' ...\n", file_name);
119 fprintf(stderr,
"ERROR: cannot mix BIN with SHP. skipping '%s' ...\n", file_name);
124 fprintf(stderr,
"ERROR: cannot mix QFIT with SHP. skipping '%s' ...\n", file_name);
129 fprintf(stderr,
"ERROR: cannot mix TXT with SHP. skipping '%s' ...\n", file_name);
137 else if (strstr(file_name,
".qi") || strstr(file_name,
".QI"))
141 fprintf(stderr,
"ERROR: cannot mix LAS with QFIT. skipping '%s' ...\n", file_name);
146 fprintf(stderr,
"ERROR: cannot mix BIN with QFIT. skipping '%s' ...\n", file_name);
151 fprintf(stderr,
"ERROR: cannot mix SHP with QFIT. skipping '%s' ...\n", file_name);
156 fprintf(stderr,
"ERROR: cannot mix TXT with QFIT. skipping '%s' ...\n", file_name);
168 fprintf(stderr,
"ERROR: cannot mix LAS with TXT. skipping '%s' ...\n", file_name);
173 fprintf(stderr,
"ERROR: cannot mix BIN with TXT. skipping '%s' ...\n", file_name);
178 fprintf(stderr,
"ERROR: cannot mix SHP with TXT. skipping '%s' ...\n", file_name);
183 fprintf(stderr,
"ERROR: cannot mix QFIT with TXT. skipping '%s' ...\n", file_name);
205 fprintf(stderr,
"ERROR: alloc for file_names pointer array failed at %d\n",
file_name_allocated);
218 if (this->scale_factor == 0) this->scale_factor =
new F64[3];
223 else if (this->scale_factor)
226 this->scale_factor = 0;
234 if (this->offset == 0) this->offset =
new F64[3];
235 this->offset[0] =
offset[0];
236 this->offset[1] =
offset[1];
237 this->offset[2] =
offset[2];
239 else if (this->offset)
268 if (this->parse_string) free(this->parse_string);
275 this->parse_string = 0;
293 fprintf(stderr,
"ERROR: no valid file names\n");
314 fprintf(stderr,
"ERROR: could not open lasreaderlas for file '%s'\n",
file_names[i]);
322 fprintf(stderr,
"ERROR: could not open lasreaderbin for file '%s'\n",
file_names[i]);
330 fprintf(stderr,
"ERROR: could not open lasreadershp for file '%s'\n",
file_names[i]);
338 fprintf(stderr,
"ERROR: could not open lasreaderqfit for file '%s'\n",
file_names[i]);
352 fprintf(stderr,
"ERROR: could not open lasreadertxt for file '%s'\n",
file_names[i]);
490 x_scale_factor *= 10;
494 fprintf(stderr,
"WARNING: i changed x_scale_factor from %g to %g to accommodate enlarged bounding box\n",
header.
x_scale_factor, x_scale_factor);
501 fprintf(stderr,
"WARNING: i changed x_offset from %g to %g to accommodate enlarged bounding box\n",
header.
x_offset, x_offset);
516 y_scale_factor *= 10;
520 fprintf(stderr,
"WARNING: i changed y_scale_factor from %g to %g to accommodate enlarged bounding box\n",
header.
y_scale_factor, y_scale_factor);
527 fprintf(stderr,
"WARNING: i changed y_offset from %g to %g to accommodate enlarged bounding box\n",
header.
y_offset, y_offset);
542 z_scale_factor *= 10;
546 fprintf(stderr,
"WARNING: i changed z_scale_factor from %g to %g to accommodate enlarged bounding box\n",
header.
z_scale_factor, z_scale_factor);
553 fprintf(stderr,
"WARNING: i changed z_offset from %g to %g to accommodate enlarged bounding box\n",
header.
z_offset, z_offset);
void set_scale_factor(const F64 *scale_factor)
LASreaderLAS * lasreaderlas
virtual void set_transform(LAStransform *transform)
BOOL read(const char *file_name)
virtual void close(BOOL close_stream=TRUE)=0
void set_translate_intensity(F32 translate_intensity)
BOOL open(const char *file_name)
virtual BOOL inside_circle(const F64 center_x, const F64 center_y, const F64 radius)
BOOL read_point_default()
void set_scale_factor(const F64 *scale_factor)
BOOL open(const char *file_name, U32 io_buffer_size=65536)
BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size)
void set_populate_header(BOOL populate_header)
void set_translate_intensity(F32 translate_intensity)
I32 number_extra_attributes
virtual I32 get_format() const =0
void set_scale_scan_angle(F32 scale_scan_angle)
virtual BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size)
virtual void set_filter(LASfilter *filter)
BOOL inside_circle(const F64 center_x, const F64 center_y, const F64 radius)
void set_scale_intensity(F32 scale_intensity)
void set_parse_string(const char *parse_string)
void set_offset(const F64 *offset)
void set_scale_intensity(F32 scale_intensity)
void set_skip_lines(I32 skip_lines)
LASreaderQFIT * lasreaderqfit
BOOL read_point_alternate()
LASreaderSHP * lasreadershp
LASreaderBIN * lasreaderbin
virtual BOOL inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y)
LASreaderTXT * lasreadertxt
void set_index(LASindex *index)
BOOL add_file_name(const char *file_name)
void set_translate_scan_angle(F32 translate_scan_angle)
void filter(lvr2::PointBufferPtr &cloud, lvr2::indexArray &inlier, size_t j)
void set_transform(LAStransform *transform)
void close(BOOL close_stream=TRUE)
void set_offset(const F64 *offset)
BOOL init_extra_attributes(U32 number_extra_attributes, LASattribute *extra_attributes)
virtual BOOL open(const char *file_name)
BOOL init(const LASquantizer *quantizer, const U8 point_type, const U16 point_size, const LASattributer *attributer=0)
BOOL open(const char *file_name)
virtual BOOL open(const char *file_name, const char *parse_string=0, I32 skip_lines=0, BOOL populate_header=FALSE)
LASattribute * extra_attributes
void set_scale_scan_angle(F32 scale_scan_angle)
void set_translate_scan_angle(F32 translate_scan_angle)
BOOL inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y)
void set_filter(LASfilter *filter)
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