Go to the documentation of this file.
   78   if (this->index) 
delete this->
index;
 
  332       if (!lasreadermerged->
open())
 
  334         fprintf(stderr,
"ERROR: cannot open lasreadermerged with %d file names\n", 
file_name_number);
 
  335         delete lasreadermerged;
 
  343       return lasreadermerged;
 
  362           fprintf(stderr,
"ERROR: cannot open lasreaderlas with file name '%s'\n", 
file_name);
 
  391           fprintf(stderr,
"ERROR: cannot open lasreaderbin with file name '%s'\n", 
file_name);
 
  420           fprintf(stderr,
"ERROR: cannot open lasreadershp with file name '%s'\n", 
file_name);
 
  444           fprintf(stderr,
"ERROR: cannot open lasreaderqfit with file name '%s'\n", 
file_name);
 
  445           delete lasreaderqfit;
 
  458         return lasreaderqfit;
 
  478           fprintf(stderr,
"ERROR: cannot open lasreadertxt with file name '%s'\n", 
file_name);
 
  503     if (!lasreaderlas->
open(stdin))
 
  505       fprintf(stderr,
"ERROR: cannot open lasreaderlas from stdin \n");
 
  529       if (!lasreadermerged->
reopen())
 
  531         fprintf(stderr,
"ERROR: cannot reopen lasreadermerged\n");
 
  548           fprintf(stderr,
"ERROR: cannot reopen lasreaderlas with file name '%s'\n", 
file_name);
 
  562           fprintf(stderr,
"ERROR: cannot reopen lasreaderbin with file name '%s'\n", 
file_name);
 
  576           fprintf(stderr,
"ERROR: cannot reopen lasreadershp with file name '%s'\n", 
file_name);
 
  590           fprintf(stderr,
"ERROR: cannot reopen lasreaderqfit with file name '%s'\n", 
file_name);
 
  604           fprintf(stderr,
"ERROR: cannot reopen lasreadertxt with file name '%s'\n", 
file_name);
 
  617     fprintf(stderr,
"ERROR: no lasreader input specified\n");
 
  632       return waveform13reader;
 
  639       return waveform13reader;
 
  642   delete waveform13reader;
 
  648   fprintf(stderr,
"Supported LAS Inputs\n");
 
  649   fprintf(stderr,
"  -i lidar.las\n");
 
  650   fprintf(stderr,
"  -i lidar.laz\n");
 
  651   fprintf(stderr,
"  -i lidar1.las lidar2.las lidar3.las -merged\n");
 
  652   fprintf(stderr,
"  -i *.las\n");
 
  653   fprintf(stderr,
"  -i flight0??.laz flight1??.laz -single\n");
 
  654   fprintf(stderr,
"  -i terrasolid.bin\n");
 
  655   fprintf(stderr,
"  -i esri.shp\n");
 
  656   fprintf(stderr,
"  -i nasa.qi\n");
 
  657   fprintf(stderr,
"  -i lidar.txt -iparse xyzti -iskip 2 (on-the-fly from ASCII)\n");
 
  658   fprintf(stderr,
"  -i lidar.txt -iparse xyzi -itranslate_intensity 1024\n");
 
  659   fprintf(stderr,
"  -lof file_list.txt\n");
 
  660   fprintf(stderr,
"  -stdin (pipe from stdin)\n");
 
  661   fprintf(stderr,
"  -rescale 0.1 0.1 0.1\n");
 
  662   fprintf(stderr,
"  -reoffset 600000 4000000 0\n");
 
  668   for (i = 1; i < 
argc; i++)
 
  670     if (
argv[i][0] == 
'\0')
 
  674     else if (strcmp(
argv[i],
"-h") == 0 || strcmp(
argv[i],
"-help") == 0)
 
  681     else if (strcmp(
argv[i],
"-i") == 0)
 
  685         fprintf(stderr,
"ERROR: '%s' needs at least 1 argument: file_name or wild_card\n", 
argv[i]);
 
  693         add_file_name_windows(
argv[i]);
 
  699       } 
while (i < 
argc && *
argv[i] != 
'-');
 
  702     else if (strcmp(
argv[i],
"-inside_tile") == 0)
 
  706         fprintf(stderr,
"ERROR: '%s' needs 3 arguments: ll_x, ll_y, size\n", 
argv[i]);
 
  715     else if (strcmp(
argv[i],
"-inside_circle") == 0)
 
  719         fprintf(stderr,
"ERROR: '%s' needs 3 arguments: center_x, center_y, radius\n", 
argv[i]);
 
  728     else if (strcmp(
argv[i],
"-inside") == 0 || strcmp(
argv[i],
"-inside_rectangle") == 0)
 
  732         fprintf(stderr,
"ERROR: '%s' needs 4 arguments: min_x, min_y, max_x, max_y\n", 
argv[i]);
 
  742     else if (strcmp(
argv[i],
"-stdin") == 0)
 
  747     else if (strcmp(
argv[i],
"-lof") == 0)
 
  751         fprintf(stderr,
"ERROR: '%s' needs 1 argument: list_of_files\n", 
argv[i]);
 
  757         fprintf(stderr, 
"ERROR: cannot open '%s'\n", 
argv[i+1]);
 
  761       while (fgets(line, 1024, 
file))
 
  764         size_t len = strlen(line) - 1;
 
  766         while (len > 0 && ((line[len] == 
'\n') || (line[len] == 
' ') || (line[len] == 
'\t') || (line[len] == 
'\012')))
 
  773       *
argv[i]=
'\0'; *
argv[i+1]=
'\0'; i+=1;
 
  775     else if (strcmp(
argv[i],
"-rescale") == 0)
 
  779         fprintf(stderr,
"ERROR: '%s' needs 3 arguments: rescale_x, rescale_y, rescale_z\n", 
argv[i]);
 
  789     else if (strcmp(
argv[i],
"-reoffset") == 0)
 
  793         fprintf(stderr,
"ERROR: '%s' needs 3 arguments: reoffset_x, reoffset_y, reoffset_z\n", 
argv[i]);
 
  803     else if (strcmp(
argv[i],
"-files_are_flightlines") == 0)
 
  808     else if (strcmp(
argv[i],
"-itranslate_intensity") == 0)
 
  812         fprintf(stderr,
"ERROR: '%s' needs 1 argument: offset\n", 
argv[i]);
 
  816       *
argv[i]=
'\0'; *
argv[i+1]=
'\0'; i+=1;
 
  818     else if (strcmp(
argv[i],
"-iscale_intensity") == 0)
 
  822         fprintf(stderr,
"ERROR: '%s' needs 1 argument: scale\n", 
argv[i]);
 
  826       *
argv[i]=
'\0'; *
argv[i+1]=
'\0'; i+=1;
 
  828     else if (strcmp(
argv[i],
"-itranslate_scan_angle") == 0)
 
  832         fprintf(stderr,
"ERROR: '%s' needs 1 argument: offset\n", 
argv[i]);
 
  836       *
argv[i]=
'\0'; *
argv[i+1]=
'\0'; i+=1;
 
  838     else if (strcmp(
argv[i],
"-iscale_scan_angle") == 0)
 
  842         fprintf(stderr,
"ERROR: '%s' needs 1 argument: scale\n", 
argv[i]);
 
  846       *
argv[i]=
'\0'; *
argv[i+1]=
'\0'; i+=1;
 
  848     else if (strcmp(
argv[i],
"-iadd_extra") == 0)
 
  852         fprintf(stderr,
"ERROR: '%s' needs 3 arguments: data_type name description\n", 
argv[i]);
 
  855       if (((i+4) < 
argc) && (
argv[i+4][0] != 
'-'))
 
  857         if (((i+5) < 
argc) && (
argv[i+5][0] != 
'-'))
 
  874     else if (strcmp(
argv[i],
"-iparse") == 0)
 
  878         fprintf(stderr,
"ERROR: '%s' needs 1 argument: string\n", 
argv[i]);
 
  882       *
argv[i]=
'\0'; *
argv[i+1]=
'\0'; i+=1;
 
  884     else if (strcmp(
argv[i],
"-iskip") == 0)
 
  888         fprintf(stderr,
"ERROR: '%s' needs 1 argument: number_of_lines\n", 
argv[i]);
 
  892       *
argv[i]=
'\0'; *
argv[i+1]=
'\0'; i+=1;
 
  894     else if (strcmp(
argv[i],
"-single") == 0)
 
  899     else if (strcmp(
argv[i],
"-merged") == 0)
 
  904     else if (strcmp(
argv[i],
"-populate") == 0)
 
  909     else if (strcmp(
argv[i],
"-do_not_populate") == 0)
 
 1000   add_file_name_windows(
file_name, unique);
 
 1033       fprintf(stderr, 
"ERROR: alloc for file_names pointer array failed at %d\n", 
file_name_allocated);
 
 1066 #include <windows.h> 
 1067 void LASreadOpener::add_file_name_windows(
const char* file_name, 
BOOL unique)
 
 1070   WIN32_FIND_DATA info;
 
 1072   if (h != INVALID_HANDLE_VALUE)
 
 1076     while (len && 
file_name[len] != 
'\\') len--;
 
 1080       char full_file_name[512];
 
 1081       strncpy(full_file_name, 
file_name, len);
 
 1084         sprintf(&full_file_name[len], 
"%s", info.cFileName);
 
 1086           } 
while (FindNextFile(h, &info));
 
 1093           } 
while (FindNextFile(h, &info));
 
 1107   if (this->parse_string) free(this->parse_string);
 
 1114     this->parse_string = 0;
 
 1127     if (this->scale_factor == 0) this->scale_factor = 
new F64[3];
 
 1132   else if (this->scale_factor)
 
 1135     this->scale_factor = 0;
 
 1143     if (this->offset == 0) this->offset = 
new F64[3];
 
 1144     this->offset[0] = 
offset[0];
 
 1145     this->offset[1] = 
offset[1];
 
 1146     this->offset[2] = 
offset[2];
 
 1148   else if (this->offset)
 
 1214   for (
I32 i = 0; i < 10; i++)
 
  
BOOL set_file_name_current(U32 file_name_id)
void add_extra_attribute(I32 data_type, const char *name, const char *description=0, F64 scale=1.0, F64 offset=0.0)
BOOL read_point_inside_circle_indexed()
void set_scale_factor(const F64 *scale_factor)
virtual BOOL read_point_default()=0
virtual void set_transform(LAStransform *transform)
void set_merged(const BOOL merged)
BOOL read(const char *file_name)
#define LAS_TOOLS_FORMAT_QFIT
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)
#define LAS_TOOLS_FORMAT_SHP
BOOL reopen(const char *file_name)
BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 ur_x, const F32 ur_y) const
const char * get_parse_string() const
I32 get_file_format(U32 number) const
void set_scale_factor(const F64 *scale_factor)
#define LAS_TOOLS_FORMAT_LAS
void set_scale_factor(const F64 *scale_factor)
BOOL open(const char *file_name, U32 io_buffer_size=65536)
F64 extra_attribute_offsets[10]
BOOL read_point_inside_tile_indexed()
void add_extra_attribute(I32 data_type, const char *name, const char *description=0, F64 scale=1.0, F64 offset=0.0)
BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size)
void set_populate_header(BOOL populate_header)
BOOL read_point_inside_rectangle()
I32 number_extra_attributes
char * extra_attribute_descriptions[10]
BOOL read_point_transformed()
void set_translate_intensity(F32 translate_intensity)
BOOL read_point_filtered_and_transformed()
char * extra_attribute_names[10]
#define LAS_TOOLS_FORMAT_BIN
void set_scale_scan_angle(F32 scale_scan_angle)
BOOL add_file_name(const char *file_name, BOOL unique=FALSE)
virtual BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size)
BOOL intersect_tile(const F32 ll_x, const F32 ll_y, const F32 size)
virtual void set_filter(LASfilter *filter)
BOOL reopen(const char *file_name)
BOOL inside_circle(const F64 center_x, const F64 center_y, const F64 radius)
void set_scale_intensity(F32 scale_intensity)
BOOL seek_next(LASreader *lasreader)
void set_offset(const F64 *offset)
I32 extra_attribute_data_types[10]
void set_parse_string(const char *parse_string)
BOOL inside_circle(const F64 center_x, const F64 center_y, F64 squared_radius) const
BOOL intersect_rectangle(const F64 r_min_x, const F64 r_min_y, const F64 r_max_x, const F64 r_max_y)
BOOL parse(int argc, char *argv[])
BOOL reopen(LASreader *lasreader)
void set_offset(const F64 *offset)
void set_scale_intensity(F32 scale_intensity)
void set_translate_intensity(F32 translate_intensity)
void set_file_name(const char *file_name, BOOL unique=FALSE)
const char * get_file_name() const
void set_scale_intensity(F32 scale_intensity)
void set_skip_lines(I32 skip_lines)
BOOL intersect_circle(const F64 center_x, const F64 center_y, const F64 radius)
void set_parse_string(const char *parse_string)
BOOL read_point_inside_tile()
void set_translate_scan_angle(F32 translate_scan_angle)
void use_alternate_reader()
virtual BOOL inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y)
BOOL inside_rectangle(const F64 r_min_x, const F64 r_min_y, const F64 r_max_x, const F64 r_max_y) const
F64 extra_attribute_scales[10]
void set_index(LASindex *index)
BOOL add_file_name(const char *file_name)
void set_translate_scan_angle(F32 translate_scan_angle)
LASindex * get_index() const
LASwaveform13reader * open_waveform13(const LASheader *lasheader)
void filter(lvr2::PointBufferPtr &cloud, lvr2::indexArray &inlier, size_t j)
void delete_file_name(U32 file_name_id)
#define LAS_TOOLS_FORMAT_TXT
BOOL has_populated_header() const
BOOL reopen(const char *file_name)
BOOL read_point_filtered()
void set_transform(LAStransform *transform)
void set_skip_lines(I32 skip_lines)
void set_offset(const F64 *offset)
virtual BOOL open(const char *file_name)
BOOL open(const char *file_name)
BOOL(LASreader::* read_simple)()
virtual BOOL open(const char *file_name, const char *parse_string=0, I32 skip_lines=0, BOOL populate_header=FALSE)
#define LAS_TOOLS_FORMAT_LAZ
BOOL filter(const LASpoint *point)
void set_scale_scan_angle(F32 scale_scan_angle)
BOOL parse(int argc, char *argv[])
U32 get_file_name_number() const
BOOL read_point_inside_circle()
BOOL read_point_inside_rectangle_indexed()
void set_populate_header(BOOL populate_header)
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)
BOOL(LASreader::* read_complex)()
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