lasreadermerged.cpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: lasreadermerged.cpp
5 
6  CONTENTS:
7 
8  see corresponding header file
9 
10  PROGRAMMERS:
11 
12  martin.isenburg@gmail.com
13 
14  COPYRIGHT:
15 
16  (c) 2007-2011, Martin Isenburg, LASSO - tools to catch reality
17 
18  This is free software; you can redistribute and/or modify it under the
19  terms of the GNU Lesser General Licence as published by the Free Software
20  Foundation. See the COPYING file for more information.
21 
22  This software is distributed WITHOUT ANY WARRANTY and without even the
23  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 
25  CHANGE HISTORY:
26 
27  see corresponding header file
28 
29 ===============================================================================
30 */
31 #include "lasreadermerged.hpp"
32 
33 #include "lasindex.hpp"
34 #include "lasfilter.hpp"
35 
36 #include <stdlib.h>
37 #include <string.h>
38 
39 BOOL LASreaderMerged::add_file_name(const char* file_name)
40 {
41  // do we have a file name
42  if (file_name == 0)
43  {
44  fprintf(stderr, "ERROR: file name pointer is NULL\n");
45  return FALSE;
46  }
47  // does the file exist
48  FILE* file = fopen(file_name, "r");
49  if (file == 0)
50  {
51  fprintf(stderr, "ERROR: file '%s' cannot be opened\n", file_name);
52  return FALSE;
53  }
54  fclose(file);
55  // check file extension
56  if (strstr(file_name, ".las") || strstr(file_name, ".laz") || strstr(file_name, ".LAS") || strstr(file_name, ".LAZ"))
57  {
58  if (lasreaderbin)
59  {
60  fprintf(stderr, "ERROR: cannot mix BIN with LAS. skipping '%s' ...\n", file_name);
61  return FALSE;
62  }
63  if (lasreadershp)
64  {
65  fprintf(stderr, "ERROR: cannot mix SHP with LAS. skipping '%s' ...\n", file_name);
66  return FALSE;
67  }
68  if (lasreaderqfit)
69  {
70  fprintf(stderr, "ERROR: cannot mix QFIT with LAS. skipping '%s' ...\n", file_name);
71  return FALSE;
72  }
73  if (lasreadertxt)
74  {
75  fprintf(stderr, "ERROR: cannot mix TXT with LAS. skipping '%s' ...\n", file_name);
76  return FALSE;
77  }
78  if (lasreaderlas == 0)
79  {
81  }
82  }
83  else if (strstr(file_name, ".bin") || strstr(file_name, ".BIN"))
84  {
85  if (lasreaderlas)
86  {
87  fprintf(stderr, "ERROR: cannot mix LAS with BIN. skipping '%s' ...\n", file_name);
88  return FALSE;
89  }
90  if (lasreadershp)
91  {
92  fprintf(stderr, "ERROR: cannot mix SHP with BIN. skipping '%s' ...\n", file_name);
93  return FALSE;
94  }
95  if (lasreaderqfit)
96  {
97  fprintf(stderr, "ERROR: cannot mix QFIT with BIN. skipping '%s' ...\n", file_name);
98  return FALSE;
99  }
100  if (lasreadertxt)
101  {
102  fprintf(stderr, "ERROR: cannot mix TXT with BIN. skipping '%s' ...\n", file_name);
103  return FALSE;
104  }
105  if (lasreaderbin == 0)
106  {
108  }
109  }
110  else if (strstr(file_name, ".shp") || strstr(file_name, ".SHP"))
111  {
112  if (lasreaderlas)
113  {
114  fprintf(stderr, "ERROR: cannot mix LAS with SHP. skipping '%s' ...\n", file_name);
115  return FALSE;
116  }
117  if (lasreaderbin)
118  {
119  fprintf(stderr, "ERROR: cannot mix BIN with SHP. skipping '%s' ...\n", file_name);
120  return FALSE;
121  }
122  if (lasreaderqfit)
123  {
124  fprintf(stderr, "ERROR: cannot mix QFIT with SHP. skipping '%s' ...\n", file_name);
125  return FALSE;
126  }
127  if (lasreadertxt)
128  {
129  fprintf(stderr, "ERROR: cannot mix TXT with SHP. skipping '%s' ...\n", file_name);
130  return FALSE;
131  }
132  if (lasreadershp == 0)
133  {
135  }
136  }
137  else if (strstr(file_name, ".qi") || strstr(file_name, ".QI"))
138  {
139  if (lasreaderlas)
140  {
141  fprintf(stderr, "ERROR: cannot mix LAS with QFIT. skipping '%s' ...\n", file_name);
142  return FALSE;
143  }
144  if (lasreaderbin)
145  {
146  fprintf(stderr, "ERROR: cannot mix BIN with QFIT. skipping '%s' ...\n", file_name);
147  return FALSE;
148  }
149  if (lasreadershp)
150  {
151  fprintf(stderr, "ERROR: cannot mix SHP with QFIT. skipping '%s' ...\n", file_name);
152  return FALSE;
153  }
154  if (lasreadertxt)
155  {
156  fprintf(stderr, "ERROR: cannot mix TXT with QFIT. skipping '%s' ...\n", file_name);
157  return FALSE;
158  }
159  if (lasreaderqfit == 0)
160  {
162  }
163  }
164  else
165  {
166  if (lasreaderlas)
167  {
168  fprintf(stderr, "ERROR: cannot mix LAS with TXT. skipping '%s' ...\n", file_name);
169  return FALSE;
170  }
171  if (lasreaderbin)
172  {
173  fprintf(stderr, "ERROR: cannot mix BIN with TXT. skipping '%s' ...\n", file_name);
174  return FALSE;
175  }
176  if (lasreadershp)
177  {
178  fprintf(stderr, "ERROR: cannot mix SHP with TXT. skipping '%s' ...\n", file_name);
179  return FALSE;
180  }
181  if (lasreaderqfit)
182  {
183  fprintf(stderr, "ERROR: cannot mix QFIT with TXT. skipping '%s' ...\n", file_name);
184  return FALSE;
185  }
186  if (lasreadertxt == 0)
187  {
189  }
190  }
191  // add the file
193  {
194  file_name_allocated += 1024;
195  if (file_names)
196  {
197  file_names = (char**)realloc(file_names, sizeof(char*)*file_name_allocated);
198  }
199  else
200  {
201  file_names = (char**)malloc(sizeof(char*)*file_name_allocated);
202  }
203  if (file_names == 0)
204  {
205  fprintf(stderr, "ERROR: alloc for file_names pointer array failed at %d\n", file_name_allocated);
206  return FALSE;
207  }
208  }
209  file_names[file_name_number] = strdup(file_name);
211  return TRUE;
212 }
213 
214 void LASreaderMerged::set_scale_factor(const F64* scale_factor)
215 {
216  if (scale_factor)
217  {
218  if (this->scale_factor == 0) this->scale_factor = new F64[3];
219  this->scale_factor[0] = scale_factor[0];
220  this->scale_factor[1] = scale_factor[1];
221  this->scale_factor[2] = scale_factor[2];
222  }
223  else if (this->scale_factor)
224  {
225  delete [] this->scale_factor;
226  this->scale_factor = 0;
227  }
228 }
229 
230 void LASreaderMerged::set_offset(const F64* offset)
231 {
232  if (offset)
233  {
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];
238  }
239  else if (this->offset)
240  {
241  delete [] this->offset;
242  this->offset = 0;
243  }
244 }
245 
247 {
248  this->translate_intensity = translate_intensity;
249 }
250 
252 {
253  this->scale_intensity = scale_intensity;
254 }
255 
257 {
258  this->translate_scan_angle = translate_scan_angle;
259 }
260 
262 {
263  this->scale_scan_angle = scale_scan_angle;
264 }
265 
266 void LASreaderMerged::set_parse_string(const char* parse_string)
267 {
268  if (this->parse_string) free(this->parse_string);
269  if (parse_string)
270  {
271  this->parse_string = strdup(parse_string);
272  }
273  else
274  {
275  this->parse_string = 0;
276  }
277 }
278 
280 {
281  this->skip_lines = skip_lines;
282 }
283 
285 {
286  this->populate_header = populate_header;
287 }
288 
290 {
291  if (file_name_number == 0)
292  {
293  fprintf(stderr, "ERROR: no valid file names\n");
294  return FALSE;
295  }
296 
297  // allocate space for the individual bounding_boxes
298  if (bounding_boxes) delete [] bounding_boxes;
300 
301  // clean header
302  header.clean();
303 
304  // combine all headers
305 
306  U32 i;
307  for (i = 0; i < file_name_number; i++)
308  {
309  // open the lasreader with the next file name
310  if (lasreaderlas)
311  {
312  if (!lasreaderlas->open(file_names[i]))
313  {
314  fprintf(stderr, "ERROR: could not open lasreaderlas for file '%s'\n", file_names[i]);
315  return FALSE;
316  }
317  }
318  else if (lasreaderbin)
319  {
320  if (!lasreaderbin->open(file_names[i]))
321  {
322  fprintf(stderr, "ERROR: could not open lasreaderbin for file '%s'\n", file_names[i]);
323  return FALSE;
324  }
325  }
326  else if (lasreadershp)
327  {
328  if (!lasreadershp->open(file_names[i]))
329  {
330  fprintf(stderr, "ERROR: could not open lasreadershp for file '%s'\n", file_names[i]);
331  return FALSE;
332  }
333  }
334  else if (lasreaderqfit)
335  {
336  if (!lasreaderqfit->open(file_names[i]))
337  {
338  fprintf(stderr, "ERROR: could not open lasreaderqfit for file '%s'\n", file_names[i]);
339  return FALSE;
340  }
341  }
342  else
343  {
351  {
352  fprintf(stderr, "ERROR: could not open lasreadertxt for file '%s'\n", file_names[i]);
353  return FALSE;
354  }
355  }
356  // record individual bounding box info
361  // populate the merged header
362  if (i == 0)
363  {
364  // use the header info from the first file
366  // zero the pointers of the other header so they don't get deallocated twice
368  lasreader->header.vlrs = 0;
369  lasreader->header.laszip = 0;
372  // count the points up to 64 bits
374  // special check for extra attributes
376  {
379  }
380  }
381  else
382  {
383  // count the points up to 64 bits
385  // but increment point counters and widen the bounding box
398  // a point type change could be problematic
400  {
401  if (!point_type_change) fprintf(stderr, "WARNING: files have different point types: %d vs %d\n", header.point_data_format, lasreader->header.point_data_format);
403  }
404  // a point size change could be problematic
406  {
407  if (!point_size_change) fprintf(stderr, "WARNING: files have different point sizes: %d vs %d\n", header.point_data_record_length, lasreader->header.point_data_record_length);
409  }
410  // and check if we need to resample points because scalefactor of offsets change
414  {
415 // if (!rescale) fprintf(stderr, "WARNING: files have different scale factors: %g %g %g vs %g %g %g\n", header.x_scale_factor, header.y_scale_factor, header.z_scale_factor, lasreader->header.x_scale_factor, lasreader->header.y_scale_factor, lasreader->header.z_scale_factor);
416  rescale = TRUE;
417  }
421  {
422 // if (!reoffset) fprintf(stderr, "WARNING: files have different offsets: %g %g %g vs %g %g %g\n", header.x_offset, header.y_offset, header.z_offset, lasreader->header.x_offset, lasreader->header.y_offset, lasreader->header.z_offset);
423  reoffset = TRUE;
424  }
425  }
426  lasreader->close();
427  }
428 
429  // was it requested to rescale or reoffset
430 
431  if (scale_factor)
432  {
434  {
436  rescale = TRUE;
437  }
439  {
441  rescale = TRUE;
442  }
444  {
446  rescale = TRUE;
447  }
448  }
449  if (offset)
450  {
451  if (header.x_offset != offset[0])
452  {
453  header.x_offset = offset[0];
454  reoffset = TRUE;
455  }
456  if (header.y_offset != offset[1])
457  {
458  header.y_offset = offset[1];
459  reoffset = TRUE;
460  }
461  if (header.z_offset != offset[2])
462  {
463  header.z_offset = offset[2];
464  reoffset = TRUE;
465  }
466  }
467 
468  // initialize the point with the header info
469 
470  if (header.laszip)
471  {
473  }
474  else
475  {
477  }
478 
479  // check if the header can support the enlarged bounding box
480 
481  // check x
482 
484  {
485  // maybe we can fix it by adjusting the offset (and if needed by lowering the resolution via the scale factor)
486  F64 x_offset = (F64)I64_QUANTIZE((header.min_x + header.max_x)/2);
487  F64 x_scale_factor = header.x_scale_factor;
488  while ((((header.max_x - x_offset) / x_scale_factor) > I32_MAX) || (((header.min_x - x_offset) / x_scale_factor) < I32_MIN))
489  {
490  x_scale_factor *= 10;
491  }
492  if (header.x_scale_factor != x_scale_factor)
493  {
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);
495  header.x_scale_factor = x_scale_factor;
496  rescale = TRUE;
497  }
498  // maybe we changed the resolution ... so do we really need to adjuste the offset
499  if ((((header.max_x - header.x_offset) / x_scale_factor) > I32_MAX) || (((header.min_x - header.x_offset) / x_scale_factor) < I32_MIN))
500  {
501  fprintf(stderr, "WARNING: i changed x_offset from %g to %g to accommodate enlarged bounding box\n", header.x_offset, x_offset);
502  header.x_offset = x_offset;
503  reoffset = TRUE;
504  }
505  }
506 
507  // check y
508 
510  {
511  // maybe we can fix it by adjusting the offset (and if needed by lowering the resolution via the scale factor)
512  F64 y_offset = (F64)I64_QUANTIZE((header.min_y + header.max_y)/2);
513  F64 y_scale_factor = header.y_scale_factor;
514  while ((((header.max_y - y_offset) / y_scale_factor) > I32_MAX) || (((header.min_y - y_offset) / y_scale_factor) < I32_MIN))
515  {
516  y_scale_factor *= 10;
517  }
518  if (header.y_scale_factor != y_scale_factor)
519  {
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);
521  header.y_scale_factor = y_scale_factor;
522  rescale = TRUE;
523  }
524  // maybe we changed the resolution ... so do we really need to adjuste the offset
525  if ((((header.max_y - header.y_offset) / y_scale_factor) > I32_MAX) || (((header.min_y - header.y_offset) / y_scale_factor) < I32_MIN))
526  {
527  fprintf(stderr, "WARNING: i changed y_offset from %g to %g to accommodate enlarged bounding box\n", header.y_offset, y_offset);
528  header.y_offset = y_offset;
529  reoffset = TRUE;
530  }
531  }
532 
533  // check z
534 
536  {
537  // maybe we can fix it by adjusting the offset (and if needed by lowering the resolution via the scale factor)
538  F64 z_offset = (F64)I64_QUANTIZE((header.min_z + header.max_z)/2);
539  F64 z_scale_factor = header.z_scale_factor;
540  while ((((header.max_z - z_offset) / z_scale_factor) > I32_MAX) || (((header.min_z - z_offset) / z_scale_factor) < I32_MIN))
541  {
542  z_scale_factor *= 10;
543  }
544  if (header.z_scale_factor != z_scale_factor)
545  {
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);
547  header.z_scale_factor = z_scale_factor;
548  rescale = TRUE;
549  }
550  // maybe we changed the resolution ... so do we really need to adjuste the offset
551  if ((((header.max_z - header.z_offset) / z_scale_factor) > I32_MAX) || (((header.min_z - header.z_offset) / z_scale_factor) < I32_MIN))
552  {
553  fprintf(stderr, "WARNING: i changed z_offset from %g to %g to accommodate enlarged bounding box\n", header.z_offset, z_offset);
554  header.z_offset = z_offset;
555  reoffset = TRUE;
556  }
557  }
558 
559  if (rescale || reoffset)
560  {
561  if (lasreaderlas)
562  {
563  delete lasreaderlas;
564  if (rescale && reoffset)
566  else if (rescale)
568  else
571  }
572  else if (lasreaderbin)
573  {
574  delete lasreaderbin;
575  if (rescale && reoffset)
577  else if (rescale)
579  else
582  }
583  else if (lasreadershp)
584  {
585  delete lasreadershp;
586  if (rescale && reoffset)
588  else if (rescale)
590  else
593  }
594  else if (lasreaderqfit)
595  {
596  delete lasreaderqfit;
597  if (rescale && reoffset)
599  else if (rescale)
601  else
604  }
605  else
606  {
607  delete lasreadertxt;
608  if (rescale && reoffset)
610  else if (rescale)
612  else
621  }
622  }
623 
624  p_count = 0;
625  file_name_current = 0;
626 
627  return TRUE;
628 }
629 
631 {
632  this->filter = filter;
633 }
634 
636 {
637  this->transform = transform;
638 }
639 
640 BOOL LASreaderMerged::inside_tile(const F32 ll_x, const F32 ll_y, const F32 size)
641 {
642  inside = 1;
643  t_ll_x = ll_x;
644  t_ll_y = ll_y;
645  t_size = size;
646  t_ur_x = ll_x + size;
647  t_ur_y = ll_y + size;
648  header.min_x = ll_x;
649  header.min_y = ll_y;
650  header.max_x = ll_x + size - 0.001f * header.x_scale_factor;
651  header.max_y = ll_y + size - 0.001f * header.y_scale_factor;
652  return TRUE;
653 }
654 
655 BOOL LASreaderMerged::inside_circle(const F64 center_x, const F64 center_y, const F64 radius)
656 {
657  inside = 2;
658  c_center_x = center_x;
659  c_center_y = center_y;
660  c_radius = radius;
661  c_radius_squared = radius*radius;
662  header.min_x = center_x - radius;
663  header.min_y = center_y - radius;
664  header.max_x = center_x + radius;
665  header.max_y = center_y + radius;
666  return TRUE;
667 }
668 
669 BOOL LASreaderMerged::inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y)
670 {
671  inside = 3;
672  r_min_x = min_x;
673  r_min_y = min_y;
674  r_max_x = max_x;
675  r_max_y = max_y;
676  header.min_x = min_x;
677  header.min_y = min_y;
678  header.max_x = max_x;
679  header.max_y = max_y;
680  return TRUE;
681 }
682 
684 {
685  return lasreader->get_format();
686 }
687 
689 {
690  if (file_name_current == 0)
691  {
692  if (!open_next_file()) return FALSE;
693  }
694 
695  while (true)
696  {
697  if (lasreader->read_point())
698  {
699  point = lasreader->point;
700  p_count++;
701  return TRUE;
702  }
703  if (lasreaderbin)
704  {
716  }
717  else if (lasreadertxt)
718  {
719  if (!populate_header)
720  {
733  }
734  }
735  lasreader->close();
736  point.zero();
737  if (!open_next_file()) return FALSE;
738  }
739  return FALSE;
740 }
741 
743 {
744  if (!read_point_default()) return FALSE;
746  return TRUE;
747 }
748 
749 void LASreaderMerged::close(BOOL close_stream)
750 {
751  if (lasreader)
752  {
753  lasreader->close(close_stream);
754  }
755 }
756 
758 {
759  p_count = 0;
760  file_name_current = 0;
761  if (filter) filter->reset();
762  return TRUE;
763 }
764 
766 {
767  if (lasreader)
768  {
769  delete lasreader;
770  lasreader = 0;
771  lasreaderlas = 0;
772  lasreaderbin = 0;
773  lasreadershp = 0;
774  lasreaderqfit = 0;
775  lasreadertxt = 0;
776  }
779  rescale = FALSE;
780  reoffset = FALSE;
781  if (scale_factor)
782  {
783  delete [] scale_factor;
784  scale_factor = 0;
785  }
786  if (offset)
787  {
788  delete [] offset;
789  offset = 0;
790  }
791  if (parse_string)
792  {
793  free(parse_string);
794  parse_string = 0;
795  }
796  skip_lines = 0;
797  translate_intensity = 0.0f;
798  scale_intensity = 1.0f;
799  translate_scan_angle = 0.0f;
800  scale_scan_angle = 1.0f;
802  if (file_names)
803  {
804  U32 i;
805  for (i = 0; i < file_name_number; i++)
806  {
807  free(file_names[i]);
808  }
809  delete [] file_names;
810  file_names = 0;
811  }
812  if (bounding_boxes)
813  {
814  delete [] bounding_boxes;
815  bounding_boxes = 0;
816  }
817  file_name_current = 0;
818  file_name_number = 0;
820  inside = 0;
821 }
822 
824 {
825  lasreader = 0;
826  lasreaderlas = 0;
827  lasreaderbin = 0;
828  lasreadershp = 0;
829  lasreaderqfit = 0;
830  lasreadertxt = 0;
831  scale_factor = 0;
832  offset = 0;
833  parse_string = 0;
834  file_names = 0;
835  bounding_boxes = 0;
836  clean();
837 }
838 
840 {
841  if (lasreader) close();
842  clean();
843 }
844 
846 {
848  {
849  if (inside)
850  {
851  // check if bounding box overlaps requested bounding box
852  if (inside < 3) // tile or circle
853  {
854  if (bounding_boxes[4*file_name_current+0] >= header.max_x) { file_name_current++; continue; }
855  if (bounding_boxes[4*file_name_current+1] >= header.max_y) { file_name_current++; continue; }
856  }
857  else // rectangle
858  {
859  if (bounding_boxes[4*file_name_current+0] > header.max_x) { file_name_current++; continue; }
860  if (bounding_boxes[4*file_name_current+1] > header.max_y) { file_name_current++; continue; }
861  }
862  if (bounding_boxes[4*file_name_current+2] < header.min_x) { file_name_current++; continue; }
863  if (bounding_boxes[4*file_name_current+3] < header.min_y) { file_name_current++; continue; }
864  }
865  // open the lasreader with the next file name
866  if (lasreaderlas)
867  {
869  {
870  fprintf(stderr, "ERROR: could not open lasreaderlas for file '%s'\n", file_names[file_name_current]);
871  return FALSE;
872  }
873  LASindex* index = new LASindex;
876  else
877  delete index;
878  }
879  else if (lasreaderbin)
880  {
882  {
883  fprintf(stderr, "ERROR: could not open lasreaderbin for file '%s'\n", file_names[file_name_current]);
884  return FALSE;
885  }
886  LASindex* index = new LASindex;
889  else
890  delete index;
891  }
892  else if (lasreadershp)
893  {
895  {
896  fprintf(stderr, "ERROR: could not open lasreadershp for file '%s'\n", file_names[file_name_current]);
897  return FALSE;
898  }
899  }
900  else if (lasreaderqfit)
901  {
903  {
904  fprintf(stderr, "ERROR: could not open lasreaderqfit for file '%s'\n", file_names[file_name_current]);
905  return FALSE;
906  }
907  LASindex* index = new LASindex;
910  else
911  delete index;
912  }
913  else
914  {
916  {
917  fprintf(stderr, "ERROR: could not open lasreadertxt for file '%s'\n", file_names[file_name_current]);
918  return FALSE;
919  }
920  }
923  if (inside)
924  {
928  }
930  return TRUE;
931  }
932  return FALSE;
933 }
LASquantizer::y_offset
F64 y_offset
Definition: lasdefinitions.hpp:96
I32_MAX
#define I32_MAX
Definition: mydefs.hpp:89
LASzip::num_items
unsigned short num_items
Definition: laszip.hpp:120
LASheader::clean
void clean()
Definition: lasdefinitions.hpp:1095
LASreaderBINrescale
Definition: lasreader_bin.hpp:67
LASheader::min_y
F64 min_y
Definition: lasdefinitions.hpp:978
LASreaderMerged::set_scale_factor
void set_scale_factor(const F64 *scale_factor)
Definition: lasreadermerged.cpp:214
lasreadermerged.hpp
LASheader::number_of_points_by_return
U32 number_of_points_by_return[5]
Definition: lasdefinitions.hpp:974
LASreaderMerged::skip_lines
I32 skip_lines
Definition: lasreadermerged.hpp:100
LASheader::user_data_in_header
I8 * user_data_in_header
Definition: lasdefinitions.hpp:992
LASreaderMerged::lasreaderlas
LASreaderLAS * lasreaderlas
Definition: lasreadermerged.hpp:84
LASreaderMerged::populate_header
BOOL populate_header
Definition: lasreadermerged.hpp:101
LASreaderSHP
Definition: lasreader_shp.hpp:38
LASreaderTXTrescale
Definition: lasreader_txt.hpp:93
LASreaderMerged::get_format
I32 get_format() const
Definition: lasreadermerged.cpp:683
LASreaderMerged::scale_intensity
F32 scale_intensity
Definition: lasreadermerged.hpp:96
LASreader::set_transform
virtual void set_transform(LAStransform *transform)
Definition: lasreader.cpp:105
LASindex::read
BOOL read(const char *file_name)
Definition: lasindex.cpp:267
transform
Definition: src/tools/lvr2_transform/Options.cpp:44
lasfilter.hpp
LASreaderMerged::open
BOOL open()
Definition: lasreadermerged.cpp:289
LASreader::point
LASpoint point
Definition: lasreader.hpp:53
LASreader::close
virtual void close(BOOL close_stream=TRUE)=0
LASreader::r_min_x
F64 r_min_x
Definition: lasreader.hpp:112
LASreaderTXT::set_translate_intensity
void set_translate_intensity(F32 translate_intensity)
Definition: lasreader_txt.cpp:385
LASreaderBIN::open
BOOL open(const char *file_name)
Definition: lasreader_bin.cpp:81
LASreader::inside_circle
virtual BOOL inside_circle(const F64 center_x, const F64 center_y, const F64 radius)
Definition: lasreader.cpp:157
LASreaderMerged::bounding_boxes
F64 * bounding_boxes
Definition: lasreadermerged.hpp:106
LASreaderTXTrescalereoffset
Definition: lasreader_txt.hpp:112
LASpoint::point_source_ID
U16 point_source_ID
Definition: lasdefinitions.hpp:489
LASreaderQFIT
Definition: lasreader_qfit.hpp:40
LASreaderLASreoffset
Definition: lasreader_las.hpp:93
LASreaderMerged::read_point_default
BOOL read_point_default()
Definition: lasreadermerged.cpp:688
LASreader::r_max_x
F64 r_max_x
Definition: lasreader.hpp:112
F64
double F64
Definition: mydefs.hpp:52
LASreaderMerged::point_type_change
BOOL point_type_change
Definition: lasreadermerged.hpp:89
LASquantizer::x_scale_factor
F64 x_scale_factor
Definition: lasdefinitions.hpp:92
I32
int I32
Definition: mydefs.hpp:35
LASreaderTXT::set_scale_factor
void set_scale_factor(const F64 *scale_factor)
Definition: lasreader_txt.cpp:405
LASreaderLAS::open
BOOL open(const char *file_name, U32 io_buffer_size=65536)
Definition: lasreader_las.cpp:46
TRUE
#define TRUE
Definition: mydefs.hpp:137
LASreader::p_count
I64 p_count
Definition: lasreader.hpp:56
LASreaderMerged::inside_tile
BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size)
Definition: lasreadermerged.cpp:640
LASzip::items
LASitem * items
Definition: laszip.hpp:121
LASreaderMerged::set_populate_header
void set_populate_header(BOOL populate_header)
Definition: lasreadermerged.cpp:284
LASreader::npoints
I64 npoints
Definition: lasreader.hpp:55
LASreaderTXTreoffset
Definition: lasreader_txt.hpp:103
LASreaderBIN
Definition: lasreader_bin.hpp:40
LASindex
Definition: lasindex.hpp:45
LASreader::r_min_y
F64 r_min_y
Definition: lasreader.hpp:112
LAStransform
Definition: lastransform.hpp:46
LASquantizer::x_offset
F64 x_offset
Definition: lasdefinitions.hpp:95
LASheader::number_of_point_records
U32 number_of_point_records
Definition: lasdefinitions.hpp:973
LASreaderMerged::clean
void clean()
Definition: lasreadermerged.cpp:765
LASreaderQFITrescale
Definition: lasreader_qfit.hpp:76
LASreaderSHPrescale
Definition: lasreader_shp.hpp:75
LASreaderMerged::set_translate_intensity
void set_translate_intensity(F32 translate_intensity)
Definition: lasreadermerged.cpp:246
LASattributer::number_extra_attributes
I32 number_extra_attributes
Definition: lasdefinitions.hpp:308
LASreader::c_radius
F64 c_radius
Definition: lasreader.hpp:114
LASreader::get_format
virtual I32 get_format() const =0
LASreaderMerged::translate_intensity
F32 translate_intensity
Definition: lasreadermerged.hpp:95
LASreaderQFITrescalereoffset
Definition: lasreader_qfit.hpp:95
LASreader::r_max_y
F64 r_max_y
Definition: lasreader.hpp:112
LASreader::t_size
F32 t_size
Definition: lasreader.hpp:113
LASreaderTXT::set_scale_scan_angle
void set_scale_scan_angle(F32 scale_scan_angle)
Definition: lasreader_txt.cpp:400
LASreader::inside_tile
virtual BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size)
Definition: lasreader.cpp:128
LASreader::set_filter
virtual void set_filter(LASfilter *filter)
Definition: lasreader.cpp:87
LASreaderLASrescale
Definition: lasreader_las.hpp:80
I32_MIN
#define I32_MIN
Definition: mydefs.hpp:88
LASreaderMerged::inside_circle
BOOL inside_circle(const F64 center_x, const F64 center_y, const F64 radius)
Definition: lasreadermerged.cpp:655
LASreaderTXT::set_scale_intensity
void set_scale_intensity(F32 scale_intensity)
Definition: lasreader_txt.cpp:390
LASreaderMerged::rescale
BOOL rescale
Definition: lasreadermerged.hpp:91
LASheader::point_data_format
U8 point_data_format
Definition: lasdefinitions.hpp:971
LASreaderMerged::set_parse_string
void set_parse_string(const char *parse_string)
Definition: lasreadermerged.cpp:266
LASreaderMerged::offset
F64 * offset
Definition: lasreadermerged.hpp:94
LASreaderMerged::inside
U32 inside
Definition: lasreadermerged.hpp:107
LASheader::user_data_after_header
I8 * user_data_after_header
Definition: lasdefinitions.hpp:1006
LASreaderMerged::file_names
char ** file_names
Definition: lasreadermerged.hpp:105
LASreaderTXT
Definition: lasreader_txt.hpp:38
LASreaderMerged::file_name_number
U32 file_name_number
Definition: lasreadermerged.hpp:103
LASreaderMerged::set_offset
void set_offset(const F64 *offset)
Definition: lasreadermerged.cpp:230
LASreaderMerged::set_scale_intensity
void set_scale_intensity(F32 scale_intensity)
Definition: lasreadermerged.cpp:251
LASreaderMerged::open_next_file
BOOL open_next_file()
Definition: lasreadermerged.cpp:845
LASreaderLAS
Definition: lasreader_las.hpp:52
LASheader::max_x
F64 max_x
Definition: lasdefinitions.hpp:975
LASreader::c_radius_squared
F64 c_radius_squared
Definition: lasreader.hpp:114
LASreaderMerged::set_skip_lines
void set_skip_lines(I32 skip_lines)
Definition: lasreadermerged.cpp:279
LASreaderMerged::parse_string
char * parse_string
Definition: lasreadermerged.hpp:99
LASreader::index
LASindex * index
Definition: lasreader.hpp:106
LASreaderMerged::lasreaderqfit
LASreaderQFIT * lasreaderqfit
Definition: lasreadermerged.hpp:87
LASreaderMerged::read_point_alternate
BOOL read_point_alternate()
Definition: lasreadermerged.cpp:742
LASreaderMerged::lasreader
LASreader * lasreader
Definition: lasreadermerged.hpp:83
LASreaderMerged::~LASreaderMerged
~LASreaderMerged()
Definition: lasreadermerged.cpp:839
LASreaderMerged::lasreadershp
LASreaderSHP * lasreadershp
Definition: lasreadermerged.hpp:86
LASreaderMerged::lasreaderbin
LASreaderBIN * lasreaderbin
Definition: lasreadermerged.hpp:85
LASquantizer::z_offset
F64 z_offset
Definition: lasdefinitions.hpp:97
LASreaderMerged::file_name_allocated
U32 file_name_allocated
Definition: lasreadermerged.hpp:104
LASreader::t_ur_x
F32 t_ur_x
Definition: lasreader.hpp:113
LASreader::inside_rectangle
virtual BOOL inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y)
Definition: lasreader.cpp:185
LASreaderMerged::lasreadertxt
LASreaderTXT * lasreadertxt
Definition: lasreadermerged.hpp:88
LASreader::set_index
void set_index(LASindex *index)
Definition: lasreader.cpp:76
LASreaderMerged::add_file_name
BOOL add_file_name(const char *file_name)
Definition: lasreadermerged.cpp:39
LASreaderMerged::reopen
BOOL reopen()
Definition: lasreadermerged.cpp:757
LASreaderTXT::set_translate_scan_angle
void set_translate_scan_angle(F32 translate_scan_angle)
Definition: lasreader_txt.cpp:395
BOOL
int BOOL
Definition: mydefs.hpp:57
filter
void filter(lvr2::PointBufferPtr &cloud, lvr2::indexArray &inlier, size_t j)
Definition: src/tools/lvr2_cl_sor/Main.cpp:40
LASreaderBINreoffset
Definition: lasreader_bin.hpp:77
LASheader::laszip
LASzip * laszip
Definition: lasdefinitions.hpp:1002
LASreaderMerged::point_size_change
BOOL point_size_change
Definition: lasreadermerged.hpp:90
FALSE
#define FALSE
Definition: mydefs.hpp:133
file
FILE * file
Definition: arithmeticencoder.cpp:77
F32
float F32
Definition: mydefs.hpp:51
LASreaderMerged::set_transform
void set_transform(LAStransform *transform)
Definition: lasreadermerged.cpp:635
LASreaderMerged::LASreaderMerged
LASreaderMerged()
Definition: lasreadermerged.cpp:823
LASreaderSHPrescalereoffset
Definition: lasreader_shp.hpp:94
LASreaderMerged::close
void close(BOOL close_stream=TRUE)
Definition: lasreadermerged.cpp:749
LASreaderLASrescalereoffset
Definition: lasreader_las.hpp:106
LASheader::max_y
F64 max_y
Definition: lasdefinitions.hpp:977
LASreaderTXT::set_offset
void set_offset(const F64 *offset)
Definition: lasreader_txt.cpp:421
LASreaderMerged::scale_scan_angle
F32 scale_scan_angle
Definition: lasreadermerged.hpp:98
LASreaderMerged::file_name_current
U32 file_name_current
Definition: lasreadermerged.hpp:102
LASattributer::init_extra_attributes
BOOL init_extra_attributes(U32 number_extra_attributes, LASattribute *extra_attributes)
Definition: lasdefinitions.hpp:337
LASfilter
Definition: lasfilter.hpp:46
LASreaderQFITreoffset
Definition: lasreader_qfit.hpp:86
LASheader::min_x
F64 min_x
Definition: lasdefinitions.hpp:976
LASreaderSHP::open
virtual BOOL open(const char *file_name)
Definition: lasreader_shp.cpp:104
LASreader::filter
LASfilter * filter
Definition: lasreader.hpp:109
LASpoint::init
BOOL init(const LASquantizer *quantizer, const U8 point_type, const U16 point_size, const LASattributer *attributer=0)
Definition: lasdefinitions.hpp:595
LASreader::c_center_y
F64 c_center_y
Definition: lasreader.hpp:114
LASreader::transform
LAStransform * transform
Definition: lasreader.hpp:110
LASreader::header
LASheader header
Definition: lasreader.hpp:52
LASheader::vlr_lastiling
LASvlr_lastiling * vlr_lastiling
Definition: lasdefinitions.hpp:1003
LASreaderQFIT::open
BOOL open(const char *file_name)
Definition: lasreader_qfit.cpp:43
lasindex.hpp
U32
unsigned int U32
Definition: mydefs.hpp:39
LASheader::vlrs
LASvlr * vlrs
Definition: lasdefinitions.hpp:994
LASreader::t_ll_x
F32 t_ll_x
Definition: lasreader.hpp:113
LASreaderSHPreoffset
Definition: lasreader_shp.hpp:85
LASreaderTXT::open
virtual BOOL open(const char *file_name, const char *parse_string=0, I32 skip_lines=0, BOOL populate_header=FALSE)
Definition: lasreader_txt.cpp:42
LASattributer::extra_attributes
LASattribute * extra_attributes
Definition: lasdefinitions.hpp:309
LASheader::max_z
F64 max_z
Definition: lasdefinitions.hpp:979
LASreader::read_point
BOOL read_point()
Definition: lasreader.hpp:74
LASreader::c_center_x
F64 c_center_x
Definition: lasreader.hpp:114
LASreaderMerged::translate_scan_angle
F32 translate_scan_angle
Definition: lasreadermerged.hpp:97
LASreaderMerged::reoffset
BOOL reoffset
Definition: lasreadermerged.hpp:92
LASreader::t_ll_y
F32 t_ll_y
Definition: lasreader.hpp:113
LASfilter::reset
void reset()
Definition: lasfilter.cpp:1546
LASheader::point_data_record_length
U16 point_data_record_length
Definition: lasdefinitions.hpp:972
I64_QUANTIZE
#define I64_QUANTIZE(n)
Definition: mydefs.hpp:114
LASreaderMerged::set_scale_scan_angle
void set_scale_scan_angle(F32 scale_scan_angle)
Definition: lasreadermerged.cpp:261
LASquantizer::y_scale_factor
F64 y_scale_factor
Definition: lasdefinitions.hpp:93
LASreader::t_ur_y
F32 t_ur_y
Definition: lasreader.hpp:113
LASpoint::zero
void zero()
Definition: lasdefinitions.hpp:753
LASreaderMerged::scale_factor
F64 * scale_factor
Definition: lasreadermerged.hpp:93
LASquantizer::z_scale_factor
F64 z_scale_factor
Definition: lasdefinitions.hpp:94
LASreaderMerged::set_translate_scan_angle
void set_translate_scan_angle(F32 translate_scan_angle)
Definition: lasreadermerged.cpp:256
LASreaderBINrescalereoffset
Definition: lasreader_bin.hpp:86
LASheader::min_z
F64 min_z
Definition: lasdefinitions.hpp:980
LASreaderMerged::inside_rectangle
BOOL inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y)
Definition: lasreadermerged.cpp:669
LASreaderMerged::set_filter
void set_filter(LASfilter *filter)
Definition: lasreadermerged.cpp:630


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