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 
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 
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 
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;
874  if (index->read(file_names[file_name_current]))
875  lasreaderlas->set_index(index);
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;
887  if (index->read(file_names[file_name_current]))
888  lasreaderlas->set_index(index);
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;
908  if (index->read(file_names[file_name_current]))
909  lasreaderqfit->set_index(index);
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 }
BOOL open(const char *file_name)
BOOL read(const char *file_name)
Definition: lasindex.cpp:267
int BOOL
Definition: mydefs.hpp:57
BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size)
virtual BOOL inside_circle(const F64 center_x, const F64 center_y, const F64 radius)
Definition: lasreader.cpp:157
virtual void close(BOOL close_stream=TRUE)=0
LASreaderLAS * lasreaderlas
F64 c_radius_squared
Definition: lasreader.hpp:114
void set_scale_scan_angle(F32 scale_scan_angle)
#define FALSE
Definition: mydefs.hpp:133
U32 number_of_point_records
float F32
Definition: mydefs.hpp:51
void set_parse_string(const char *parse_string)
U16 point_data_record_length
void set_populate_header(BOOL populate_header)
void set_translate_intensity(F32 translate_intensity)
BOOL read_point()
Definition: lasreader.hpp:74
LASheader header
Definition: lasreader.hpp:52
void set_filter(LASfilter *filter)
LASindex * index
Definition: lasreader.hpp:106
LASpoint point
Definition: lasreader.hpp:53
void set_offset(const F64 *offset)
unsigned int U32
Definition: mydefs.hpp:39
I64 p_count
Definition: lasreader.hpp:56
virtual BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 size)
Definition: lasreader.cpp:128
void set_scale_intensity(F32 scale_intensity)
F64 c_center_x
Definition: lasreader.hpp:114
LAStransform * transform
Definition: lasreader.hpp:110
LASvlr * vlrs
I64 npoints
Definition: lasreader.hpp:55
F64 c_center_y
Definition: lasreader.hpp:114
#define I64_QUANTIZE(n)
Definition: mydefs.hpp:114
BOOL init(const LASquantizer *quantizer, const U8 point_type, const U16 point_size, const LASattributer *attributer=0)
LASreaderSHP * lasreadershp
#define I32_MAX
Definition: mydefs.hpp:89
U32 number_of_points_by_return[5]
void set_scale_scan_angle(F32 scale_scan_angle)
LASreader * lasreader
void close(BOOL close_stream=TRUE)
F64 c_radius
Definition: lasreader.hpp:114
void set_translate_scan_angle(F32 translate_scan_angle)
BOOL inside_circle(const F64 center_x, const F64 center_y, const F64 radius)
void set_translate_intensity(F32 translate_intensity)
LASzip * laszip
I8 * user_data_after_header
void set_translate_scan_angle(F32 translate_scan_angle)
virtual BOOL inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y)
Definition: lasreader.cpp:185
FILE * file
int I32
Definition: mydefs.hpp:35
void set_scale_factor(const F64 *scale_factor)
virtual I32 get_format() const =0
void set_offset(const F64 *offset)
virtual BOOL open(const char *file_name)
LASreaderTXT * lasreadertxt
void set_transform(LAStransform *transform)
virtual void set_filter(LASfilter *filter)
Definition: lasreader.cpp:87
void reset()
Definition: lasfilter.cpp:1546
BOOL inside_rectangle(const F64 min_x, const F64 min_y, const F64 max_x, const F64 max_y)
LASitem * items
Definition: laszip.hpp:121
void set_index(LASindex *index)
Definition: lasreader.cpp:76
BOOL open(const char *file_name, U32 io_buffer_size=65536)
LASfilter * filter
Definition: lasreader.hpp:109
unsigned short num_items
Definition: laszip.hpp:120
BOOL add_file_name(const char *file_name)
#define TRUE
Definition: mydefs.hpp:137
void set_scale_intensity(F32 scale_intensity)
void set_scale_factor(const F64 *scale_factor)
I8 * user_data_in_header
BOOL init_extra_attributes(U32 number_extra_attributes, LASattribute *extra_attributes)
BOOL open(const char *file_name)
LASvlr_lastiling * vlr_lastiling
LASreaderQFIT * lasreaderqfit
virtual void set_transform(LAStransform *transform)
Definition: lasreader.cpp:105
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_skip_lines(I32 skip_lines)
#define I32_MIN
Definition: mydefs.hpp:88
double F64
Definition: mydefs.hpp:52
LASreaderBIN * lasreaderbin
I32 get_format() const


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 Mon Feb 28 2022 22:46:07