lasfilter.cpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: lasfilter.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 "lasfilter.hpp"
32 
33 #include <stdio.h>
34 #include <stdlib.h>
35 #include <string.h>
36 
38 {
39 public:
40  inline const char* name() const { return "clip_tile"; };
41  inline int get_command(char* string) const { return sprintf(string, "-%s %g %g %g ", name(), ll_x, ll_y, tile_size); };
42  inline BOOL filter(const LASpoint* point) { return (!point->inside_tile(ll_x, ll_y, ur_x, ur_y)); };
43  LAScriterionClipTile(F32 ll_x, F32 ll_y, F32 tile_size) { this->ll_x = ll_x; this->ll_y = ll_y; this->ur_x = ll_x+tile_size; this->ur_y = ll_y+tile_size; this->tile_size = tile_size; };
44 private:
46 };
47 
49 {
50 public:
51  inline const char* name() const { return "clip_circle"; };
52  inline int get_command(char* string) const { return sprintf(string, "-%s %g %g %g ", name(), center_x, center_y, radius); };
53  inline BOOL filter(const LASpoint* point) { return (!point->inside_circle(center_x, center_y, radius_squared)); };
54  LAScriterionClipCircle(F64 x, F64 y, F64 radius) { this->center_x = x; this->center_y = y; this->radius = radius; this->radius_squared = radius*radius; };
55 private:
57 };
58 
60 {
61 public:
62  inline const char* name() const { return "clip"; };
63  inline int get_command(char* string) const { return sprintf(string, "-%s %g %g %g %g ", name(), below_x, below_y, above_x, above_y); };
64  inline BOOL filter(const LASpoint* point) { return (!point->inside_rectangle(below_x, below_y, above_x, above_y)); };
65  LAScriterionClipXY(F64 below_x, F64 below_y, F64 above_x, F64 above_y) { this->below_x = below_x; this->below_y = below_y; this->above_x = above_x; this->above_y = above_y; };
66 private:
68 };
69 
71 {
72 public:
73  inline const char* name() const { return "clip_z"; };
74  inline int get_command(char* string) const { return sprintf(string, "-%s %g %g ", name(), below_z, above_z); };
75  inline BOOL filter(const LASpoint* point) { F64 z = point->get_z(); return (z < below_z) || (z > above_z); };
76  LAScriterionClipZ(F64 below_z, F64 above_z) { this->below_z = below_z; this->above_z = above_z; };
77 private:
79 };
80 
82 {
83 public:
84  inline const char* name() const { return "clip_x_below"; };
85  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), below_x); };
86  inline BOOL filter(const LASpoint* point) { return (point->get_x() < below_x); };
87  LAScriterionClipXBelow(F64 below_x) { this->below_x = below_x; };
88 private:
89  F64 below_x;
90 };
91 
93 {
94 public:
95  inline const char* name() const { return "clip_x_above"; };
96  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), above_x); };
97  inline BOOL filter(const LASpoint* point) { return (point->get_x() > above_x); };
98  LAScriterionClipXAbove(F64 above_x) { this->above_x = above_x; };
99 private:
100  F64 above_x;
101 };
102 
104 {
105 public:
106  inline const char* name() const { return "clip_y_below"; };
107  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), below_y); };
108  inline BOOL filter(const LASpoint* point) { return (point->get_y() < below_y); };
109  LAScriterionClipYBelow(F64 below_y) { this->below_y = below_y; };
110 private:
111  F64 below_y;
112 };
113 
115 {
116 public:
117  inline const char* name() const { return "clip_y_above"; };
118  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), above_y); };
119  inline BOOL filter(const LASpoint* point) { return (point->get_y() > above_y); };
120  LAScriterionClipYAbove(F64 above_y) { this->above_y = above_y; };
121 private:
122  F64 above_y;
123 };
124 
126 {
127 public:
128  inline const char* name() const { return "clip_z_below"; };
129  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), below_z); };
130  inline BOOL filter(const LASpoint* point) { return (point->get_z() < below_z); };
131  LAScriterionClipZBelow(F64 below_z) { this->below_z = below_z; };
132 private:
133  F64 below_z;
134 };
135 
137 {
138 public:
139  inline const char* name() const { return "clip_z_above"; };
140  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), above_z); };
141  inline BOOL filter(const LASpoint* point) { return (point->get_z() > above_z); };
142  LAScriterionClipZAbove(F64 above_z) { this->above_z = above_z; };
143 private:
144  F64 above_z;
145 };
146 
148 {
149 public:
150  inline const char* name() const { return "clip_raw_xy"; };
151  inline int get_command(char* string) const { return sprintf(string, "-%s %d %d %d %d ", name(), below_x, below_y, above_x, above_y); };
152  inline BOOL filter(const LASpoint* point) { return (point->x < below_x) || (point->y < below_y) || (point->x > above_x) || (point->y > above_y); };
153  LAScriterionClipRawXY(I32 below_x, I32 below_y, I32 above_x, I32 above_y) { this->below_x = below_x; this->below_y = below_y; this->above_x = above_x; this->above_y = above_y; };
154 private:
156 };
157 
159 {
160 public:
161  inline const char* name() const { return "clip_raw_z"; };
162  inline int get_command(char* string) const { return sprintf(string, "-%s %d %d ", name(), below_z, above_z); };
163  inline BOOL filter(const LASpoint* point) { return (point->z < below_z) || (point->z > above_z); };
164  LAScriterionClipRawZ(I32 below_z, I32 above_z) { this->below_z = below_z; this->above_z = above_z; };
165 private:
167 };
168 
170 {
171 public:
172  inline const char* name() const { return "clip_raw_x_below"; };
173  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), below_x); };
174  inline BOOL filter(const LASpoint* point) { return (point->x < below_x); };
176 private:
177  I32 below_x;
178 };
179 
181 {
182 public:
183  inline const char* name() const { return "clip_raw_x_above"; };
184  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), above_x); };
185  inline BOOL filter(const LASpoint* point) { return (point->x > above_x); };
187 private:
188  I32 above_x;
189 };
190 
192 {
193 public:
194  inline const char* name() const { return "clip_raw_y_below"; };
195  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), below_y); };
196  inline BOOL filter(const LASpoint* point) { return (point->y < below_y); };
198 private:
199  I32 below_y;
200 };
201 
203 {
204 public:
205  inline const char* name() const { return "clip_raw_y_above"; };
206  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), above_y); };
207  inline BOOL filter(const LASpoint* point) { return (point->y > above_y); };
209 private:
210  I32 above_y;
211 };
212 
214 {
215 public:
216  inline const char* name() const { return "clip_raw_z_below"; };
217  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), below_z); };
218  inline BOOL filter(const LASpoint* point) { return (point->z < below_z); };
220 private:
221  I32 below_z;
222 };
223 
225 {
226 public:
227  inline const char* name() const { return "clip_raw_z_above"; };
228  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), above_z); };
229  inline BOOL filter(const LASpoint* point) { return (point->z > above_z); };
231 private:
232  I32 above_z;
233 };
234 
236 {
237 public:
238  inline const char* name() const { return "keep_first"; };
239  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
240  inline BOOL filter(const LASpoint* point) { return (point->return_number > 1); };
241 };
242 
244 {
245 public:
246  inline const char* name() const { return "keep_middle"; };
247  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
248  inline BOOL filter(const LASpoint* point) { return ((point->return_number == 1) || (point->return_number >= point->number_of_returns_of_given_pulse)); };
249 };
250 
252 {
253 public:
254  inline const char* name() const { return "keep_last"; };
255  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
256  inline BOOL filter(const LASpoint* point) { return (point->return_number < point->number_of_returns_of_given_pulse); };
257 };
258 
260 {
261 public:
262  inline const char* name() const { return "drop_first"; };
263  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
264  inline BOOL filter(const LASpoint* point) { return (point->return_number == 1); };
265 };
266 
268 {
269 public:
270  inline const char* name() const { return "drop_middle"; };
271  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
272  inline BOOL filter(const LASpoint* point) { return ((point->return_number > 1) && (point->return_number < point->number_of_returns_of_given_pulse)); };
273 };
274 
276 {
277 public:
278  inline const char* name() const { return "drop_last"; };
279  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
280  inline BOOL filter(const LASpoint* point) { return (point->return_number >= point->number_of_returns_of_given_pulse); };
281 };
282 
284 {
285 public:
286  inline const char* name() const { return "keep_return_mask"; };
287  inline int get_command(char* string) const { return sprintf(string, "-%s %u ", name(), ~drop_return_mask); };
288  inline BOOL filter(const LASpoint* point) { return ((1 << point->return_number) & drop_return_mask); };
289  LAScriterionKeepReturns(U32 keep_return_mask) { drop_return_mask = ~keep_return_mask; };
290 private:
292 };
293 
295 {
296 public:
297  inline const char* name() const { return (numberOfReturns == 1 ? "keep_single" : (numberOfReturns == 2 ? "keep_double" : (numberOfReturns == 3 ? "keep_triple" : (numberOfReturns == 4 ? "keep_quadruple" : "keep_quintuple")))); };
298  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
299  inline BOOL filter(const LASpoint* point) { return (point->number_of_returns_of_given_pulse != numberOfReturns); };
301 private:
303 };
304 
306 {
307 public:
308  inline const char* name() const { return (numberOfReturns == 1 ? "drop_single" : (numberOfReturns == 2 ? "drop_double" : (numberOfReturns == 3 ? "drop_triple" : (numberOfReturns == 4 ? "drop_quadruple" : "drop_quintuple")))); };
309  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
310  inline BOOL filter(const LASpoint* point) { return (point->number_of_returns_of_given_pulse == numberOfReturns); };
312 private:
314 };
315 
317 {
318 public:
319  inline const char* name() const { return "drop_scan_direction"; };
320  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), scan_direction); };
321  inline BOOL filter(const LASpoint* point) { return (scan_direction == point->scan_direction_flag); };
323 private:
325 };
326 
328 {
329 public:
330  inline const char* name() const { return "scan_direction_change_only"; };
331  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
332  inline BOOL filter(const LASpoint* point) { if (scan_direction_flag == point->scan_direction_flag) return TRUE; I32 s = scan_direction_flag; scan_direction_flag = point->scan_direction_flag; return s == -1; };
333  void reset() { scan_direction_flag = -1; };
335 private:
337 };
338 
340 {
341 public:
342  inline const char* name() const { return "edge_of_flight_line_only"; };
343  inline int get_command(char* string) const { return sprintf(string, "-%s ", name()); };
344  inline BOOL filter(const LASpoint* point) { return (point->edge_of_flight_line == 0); };
345 };
346 
348 {
349 public:
350  inline const char* name() const { return "keep_scan_angle"; };
351  inline int get_command(char* string) const { return sprintf(string, "-%s %d %d ", name(), below_scan, above_scan); };
352  inline BOOL filter(const LASpoint* point) { return (point->scan_angle_rank < below_scan) || (above_scan < point->scan_angle_rank); };
353  LAScriterionKeepScanAngle(I32 below_scan, I32 above_scan) { if (above_scan < below_scan) { this->below_scan = above_scan; this->above_scan = below_scan; } else { this->below_scan = below_scan; this->above_scan = above_scan; } };
354 private:
356 };
357 
359 {
360 public:
361  inline const char* name() const { return "drop_scan_angle_below"; };
362  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), below_scan); };
363  inline BOOL filter(const LASpoint* point) { return (point->scan_angle_rank < below_scan); };
365 private:
366  I32 below_scan;
367 };
368 
370 {
371 public:
372  inline const char* name() const { return "drop_scan_angle_above"; };
373  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), above_scan); };
374  inline BOOL filter(const LASpoint* point) { return (point->scan_angle_rank > above_scan); };
376 private:
377  I32 above_scan;
378 };
379 
381 {
382 public:
383  inline const char* name() const { return "drop_scan_angle_between"; };
384  inline int get_command(char* string) const { return sprintf(string, "-%s %d %d ", name(), below_scan, above_scan); };
385  inline BOOL filter(const LASpoint* point) { return (below_scan <= point->scan_angle_rank) && (point->scan_angle_rank <= above_scan); };
386  LAScriterionDropScanAngleBetween(I32 below_scan, I32 above_scan) { if (above_scan < below_scan) { this->below_scan = above_scan; this->above_scan = below_scan; } else { this->below_scan = below_scan; this->above_scan = above_scan; } };
387 private:
389 };
390 
392 {
393 public:
394  inline const char* name() const { return "keep_intensity"; };
395  inline int get_command(char* string) const { return sprintf(string, "-%s %d %d ", name(), below_intensity, above_intensity); };
396  inline BOOL filter(const LASpoint* point) { return (point->intensity < below_intensity) || (point->intensity > above_intensity); };
397  LAScriterionKeepIntensity(I32 below_intensity, I32 above_intensity) { this->below_intensity = below_intensity; this->above_intensity = above_intensity; };
398 private:
400 };
401 
403 {
404 public:
405  inline const char* name() const { return "drop_intensity_below"; };
406  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), below_intensity); };
407  inline BOOL filter(const LASpoint* point) { return (point->intensity < below_intensity); };
409 private:
411 };
412 
414 {
415 public:
416  inline const char* name() const { return "drop_intensity_above"; };
417  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), above_intensity); };
418  inline BOOL filter(const LASpoint* point) { return (point->intensity > above_intensity); };
420 private:
422 };
423 
425 {
426 public:
427  inline const char* name() const { return "drop_intensity_between"; };
428  inline int get_command(char* string) const { return sprintf(string, "-%s %d %d ", name(), below_intensity, above_intensity); };
429  inline BOOL filter(const LASpoint* point) { return (below_intensity <= point->intensity) && (point->intensity <= above_intensity); };
431 private:
433 };
434 
436 {
437 public:
438  inline const char* name() const { return "keep_classification_mask"; };
439  inline int get_command(char* string) const { return sprintf(string, "-%s %u ", name(), ~drop_classification_mask); };
440  inline BOOL filter(const LASpoint* point) { return ((1 << point->classification) & drop_classification_mask); };
441  LAScriterionKeepClassifications(U32 keep_classification_mask) { drop_classification_mask = ~keep_classification_mask; };
442 private:
444 };
445 
447 {
448 public:
449  inline const char* name() const { return "keep_point_source"; };
450  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), point_source_id); };
451  inline BOOL filter(const LASpoint* point) { return (point->point_source_ID != point_source_id); };
453 private:
455 };
456 
458 {
459 public:
460  inline const char* name() const { return "keep_point_source_between"; };
461  inline int get_command(char* string) const { return sprintf(string, "-%s %d %d ", name(), below_point_source_id, above_point_source_id); };
462  inline BOOL filter(const LASpoint* point) { return (point->point_source_ID < below_point_source_id) || (above_point_source_id < point->point_source_ID); };
464 private:
466 };
467 
469 {
470 public:
471  inline const char* name() const { return "drop_point_source_below"; };
472  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), below_point_source_id); };
473  inline BOOL filter(const LASpoint* point) { return (point->point_source_ID < below_point_source_id) ; };
475 private:
477 };
478 
480 {
481 public:
482  inline const char* name() const { return "drop_point_source_above"; };
483  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), above_point_source_id); };
484  inline BOOL filter(const LASpoint* point) { return (point->point_source_ID > above_point_source_id); };
486 private:
488 };
489 
491 {
492 public:
493  inline const char* name() const { return "drop_point_source_between"; };
494  inline int get_command(char* string) const { return sprintf(string, "-%s %d %d ", name(), below_point_source_id, above_point_source_id); };
495  inline BOOL filter(const LASpoint* point) { return (below_point_source_id <= point->point_source_ID) && (point->point_source_ID <= above_point_source_id); };
497 private:
499 };
500 
502 {
503 public:
504  inline const char* name() const { return "keep_gps_time"; };
505  inline int get_command(char* string) const { return sprintf(string, "-%s %g %g ", name(), below_gpstime, above_gpstime); };
506  inline BOOL filter(const LASpoint* point) { return (point->have_gps_time && ((point->gps_time < below_gpstime) || (point->gps_time > above_gpstime))); };
507  LAScriterionKeepGpsTime(F64 below_gpstime, F64 above_gpstime) { this->below_gpstime = below_gpstime; this->above_gpstime = above_gpstime; };
508 private:
510 };
511 
513 {
514 public:
515  inline const char* name() const { return "drop_gps_time_below"; };
516  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), below_gpstime); };
517  inline BOOL filter(const LASpoint* point) { return (point->have_gps_time && (point->gps_time < below_gpstime)); };
519 private:
521 };
522 
524 {
525 public:
526  inline const char* name() const { return "drop_gps_time_above"; };
527  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), above_gpstime); };
528  inline BOOL filter(const LASpoint* point) { return (point->have_gps_time && (point->gps_time > above_gpstime)); };
530 private:
532 };
533 
535 {
536 public:
537  inline const char* name() const { return "drop_gps_time_between"; };
538  inline int get_command(char* string) const { return sprintf(string, "-%s %g %g ", name(), below_gpstime, above_gpstime); };
539  inline BOOL filter(const LASpoint* point) { return (point->have_gps_time && ((below_gpstime <= point->gps_time) && (point->gps_time <= above_gpstime))); };
540  LAScriterionDropGpsTimeBetween(F64 below_gpstime, F64 above_gpstime) { this->below_gpstime = below_gpstime; this->above_gpstime = above_gpstime; };
541 private:
543 };
544 
546 {
547 public:
548  inline const char* name() const { return "keep_wavepacket_mask"; };
549  inline int get_command(char* string) const { return sprintf(string, "-%s %u ", name(), ~drop_wavepacket_mask); };
550  inline BOOL filter(const LASpoint* point) { return ((1 << point->wavepacket.getIndex()) & drop_wavepacket_mask); };
551  LAScriterionKeepWavepackets(U32 keep_wavepacket_mask) { drop_wavepacket_mask = ~keep_wavepacket_mask; };
552 private:
554 };
555 
557 {
558 public:
559  inline const char* name() const { return "keep_every_nth"; };
560  inline int get_command(char* string) const { return sprintf(string, "-%s %d ", name(), every); };
561  inline BOOL filter(const LASpoint* point) { if (counter == every) { counter = 1; return FALSE; } else { counter++; return TRUE; } };
562  LAScriterionKeepEveryNth(I32 every) { this->every = every; counter = 1; };
563 private:
564  I32 counter;
566 };
567 
569 {
570 public:
571  inline const char* name() const { return "keep_random_fraction"; };
572  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), fraction); };
573  inline BOOL filter(const LASpoint* point) { F32 f = (F32)rand()/(F32)RAND_MAX; return f > fraction; };
575 private:
576  F32 fraction;
577 };
578 
580 {
581 public:
582  inline const char* name() const { return "thin_with_grid"; };
583  inline int get_command(char* string) const { return sprintf(string, "-%s %g ", name(), (grid_spacing > 0 ? grid_spacing : -grid_spacing)); };
584  inline BOOL filter(const LASpoint* point)
585  {
586  if (grid_spacing < 0)
587  {
589  anker = I32_FLOOR(point->get_y() / grid_spacing);
590  }
591  I32 pos_x = I32_FLOOR(point->get_x() / grid_spacing);
592  I32 pos_y = I32_FLOOR(point->get_y() / grid_spacing) - anker;
593  BOOL no_x_anker = FALSE;
594  U32* array_size;
595  I32** ankers;
596  U32*** array;
597  U16** array_sizes;
598  if (pos_y < 0)
599  {
600  pos_y = -pos_y - 1;
601  ankers = &minus_ankers;
602  if ((U32)pos_y < minus_plus_size && minus_plus_sizes[pos_y])
603  {
604  pos_x -= minus_ankers[pos_y];
605  if (pos_x < 0)
606  {
607  pos_x = -pos_x - 1;
608  array_size = &minus_minus_size;
609  array = &minus_minus;
610  array_sizes = &minus_minus_sizes;
611  }
612  else
613  {
614  array_size = &minus_plus_size;
615  array = &minus_plus;
616  array_sizes = &minus_plus_sizes;
617  }
618  }
619  else
620  {
621  no_x_anker = TRUE;
622  array_size = &minus_plus_size;
623  array = &minus_plus;
624  array_sizes = &minus_plus_sizes;
625  }
626  }
627  else
628  {
629  ankers = &plus_ankers;
630  if ((U32)pos_y < plus_plus_size && plus_plus_sizes[pos_y])
631  {
632  pos_x -= plus_ankers[pos_y];
633  if (pos_x < 0)
634  {
635  pos_x = -pos_x - 1;
636  array_size = &plus_minus_size;
637  array = &plus_minus;
638  array_sizes = &plus_minus_sizes;
639  }
640  else
641  {
642  array_size = &plus_plus_size;
643  array = &plus_plus;
644  array_sizes = &plus_plus_sizes;
645  }
646  }
647  else
648  {
649  no_x_anker = TRUE;
650  array_size = &plus_plus_size;
651  array = &plus_plus;
652  array_sizes = &plus_plus_sizes;
653  }
654  }
655  // maybe grow banded grid in y direction
656  if ((U32)pos_y >= *array_size)
657  {
658  U32 array_size_new = ((pos_y/1024)+1)*1024;
659  if (*array_size)
660  {
661  if (array == &minus_plus || array == &plus_plus) *ankers = (I32*)realloc(*ankers, array_size_new*sizeof(I32));
662  *array = (U32**)realloc(*array, array_size_new*sizeof(U32*));
663  *array_sizes = (U16*)realloc(*array_sizes, array_size_new*sizeof(U16));
664  }
665  else
666  {
667  if (array == &minus_plus || array == &plus_plus) *ankers = (I32*)malloc(array_size_new*sizeof(I32));
668  *array = (U32**)malloc(array_size_new*sizeof(U32*));
669  *array_sizes = (U16*)malloc(array_size_new*sizeof(U16));
670  }
671  for (U32 i = *array_size; i < array_size_new; i++)
672  {
673  (*array)[i] = 0;
674  (*array_sizes)[i] = 0;
675  }
676  *array_size = array_size_new;
677  }
678  // is this the first x anker for this y pos?
679  if (no_x_anker)
680  {
681  (*ankers)[pos_y] = pos_x;
682  pos_x = 0;
683  }
684  // maybe grow banded grid in x direction
685  U32 pos_x_pos = pos_x/32;
686  if (pos_x_pos >= (*array_sizes)[pos_y])
687  {
688  U32 array_sizes_new = ((pos_x_pos/256)+1)*256;
689  if ((*array_sizes)[pos_y])
690  {
691  (*array)[pos_y] = (U32*)realloc((*array)[pos_y], array_sizes_new*sizeof(U32));
692  }
693  else
694  {
695  (*array)[pos_y] = (U32*)malloc(array_sizes_new*sizeof(U32));
696  }
697  for (U16 i = (*array_sizes)[pos_y]; i < array_sizes_new; i++)
698  {
699  (*array)[pos_y][i] = 0;
700  }
701  (*array_sizes)[pos_y] = array_sizes_new;
702  }
703  U32 pos_x_bit = 1 << (pos_x%32);
704  if ((*array)[pos_y][pos_x_pos] & pos_x_bit) return TRUE;
705  (*array)[pos_y][pos_x_pos] |= pos_x_bit;
706  return FALSE;
707  }
708  void reset()
709  {
711  if (minus_minus_size)
712  {
713  for (U32 i = 0; i < minus_minus_size; i++) if (minus_minus[i]) free(minus_minus[i]);
714  free(minus_minus);
715  minus_minus = 0;
716  free(minus_minus_sizes);
717  minus_minus_sizes = 0;
718  minus_minus_size = 0;
719  }
720  if (minus_plus_size)
721  {
722  free(minus_ankers);
723  minus_ankers = 0;
724  for (U32 i = 0; i < minus_plus_size; i++) if (minus_plus[i]) free(minus_plus[i]);
725  free(minus_plus);
726  minus_plus = 0;
727  free(minus_plus_sizes);
728  minus_plus_sizes = 0;
729  minus_plus_size = 0;
730  }
731  if (plus_minus_size)
732  {
733  for (U32 i = 0; i < plus_minus_size; i++) if (plus_minus[i]) free(plus_minus[i]);
734  free(plus_minus);
735  plus_minus = 0;
736  free(plus_minus_sizes);
737  plus_minus_sizes = 0;
738  plus_minus_size = 0;
739  }
740  if (plus_plus_size)
741  {
742  free(plus_ankers);
743  plus_ankers = 0;
744  for (U32 i = 0; i < plus_plus_size; i++) if (plus_plus[i]) free(plus_plus[i]);
745  free(plus_plus);
746  plus_plus = 0;
747  free(plus_plus_sizes);
748  plus_plus_sizes = 0;
749  plus_plus_size = 0;
750  }
751  };
753  {
754  this->grid_spacing = -grid_spacing;
755  minus_ankers = 0;
756  minus_minus_size = 0;
757  minus_minus = 0;
758  minus_minus_sizes = 0;
759  minus_plus_size = 0;
760  minus_plus = 0;
761  minus_plus_sizes = 0;
762  plus_ankers = 0;
763  plus_minus_size = 0;
764  plus_minus = 0;
765  plus_minus_sizes = 0;
766  plus_plus_size = 0;
767  plus_plus = 0;
768  plus_plus_sizes = 0;
769  };
771 private:
788 };
789 
791 {
792  U32 i;
793  for (i = 0; i < num_criteria; i++)
794  {
795  delete criteria[i];
796  }
797  if (criteria) delete [] criteria;
798  if (counters) delete [] counters;
799  alloc_criteria = 0;
800  num_criteria = 0;
801  criteria = 0;
802  counters = 0;
803 }
804 
805 void LASfilter::usage() const
806 {
807  fprintf(stderr,"Filter points based on their coordinates.\n");
808  fprintf(stderr," -clip_tile 631000 4834000 1000 (ll_x, ll_y, size)\n");
809  fprintf(stderr," -clip_circle 630250.00 4834750.00 100 (x, y, radius)\n");
810  fprintf(stderr," -clip 630000 4834000 631000 4836000 (min_x, min_y, max_x, max_y)\n");
811  fprintf(stderr," -clip_x_below 630000.50 (min_x)\n");
812  fprintf(stderr," -clip_y_below 4834500.25 (min_y)\n");
813  fprintf(stderr," -clip_x_above 630500.50 (max_x)\n");
814  fprintf(stderr," -clip_y_above 4836000.75 (max_y)\n");
815  fprintf(stderr," -clip_z 11.125 130.725 (min_z, max_z)\n");
816  fprintf(stderr," -clip_z_below 11.125 (min_z)\n");
817  fprintf(stderr," -clip_z_above 130.725 (max_z)\n");
818  fprintf(stderr,"Filter points based on their return number.\n");
819  fprintf(stderr," -first_only -keep_first -drop_first\n");
820  fprintf(stderr," -last_only -keep_last -drop_last\n");
821  fprintf(stderr," -keep_middle -drop_middle\n");
822  fprintf(stderr," -keep_return 1 2 3\n");
823  fprintf(stderr," -drop_return 3 4\n");
824  fprintf(stderr," -keep_single -drop_single\n");
825  fprintf(stderr," -keep_double -drop_double\n");
826  fprintf(stderr," -keep_triple -drop_triple\n");
827  fprintf(stderr," -keep_quadruple -drop_quadruple\n");
828  fprintf(stderr," -keep_quintuple -drop_quintuple\n");
829  fprintf(stderr,"Filter points based on the scanline flags.\n");
830  fprintf(stderr," -drop_scan_direction 0\n");
831  fprintf(stderr," -scan_direction_change_only\n");
832  fprintf(stderr," -edge_of_flight_line_only\n");
833  fprintf(stderr,"Filter points based on their intensity.\n");
834  fprintf(stderr," -keep_intensity 20 380\n");
835  fprintf(stderr," -drop_intensity_below 20\n");
836  fprintf(stderr," -drop_intensity_above 380\n");
837  fprintf(stderr," -drop_intensity_between 4000 5000\n");
838  fprintf(stderr,"Filter points based on their classification.\n");
839  fprintf(stderr," -keep_class 1 3 7\n");
840  fprintf(stderr," -drop_class 4 2\n");
841  fprintf(stderr,"Filter points based on their point source ID.\n");
842  fprintf(stderr," -keep_point_source 3\n");
843  fprintf(stderr," -keep_point_source_between 2 6\n");
844  fprintf(stderr," -drop_point_source_below 6\n");
845  fprintf(stderr," -drop_point_source_above 15\n");
846  fprintf(stderr," -drop_point_source_between 17 21\n");
847  fprintf(stderr,"Filter points based on their scan angle.\n");
848  fprintf(stderr," -keep_scan_angle -15 15\n");
849  fprintf(stderr," -drop_scan_angle_below -15\n");
850  fprintf(stderr," -drop_scan_angle_above 15\n");
851  fprintf(stderr," -drop_scan_angle_between -25 -23\n");
852  fprintf(stderr,"Filter points based on their gps time.\n");
853  fprintf(stderr," -keep_gps_time 11.125 130.725\n");
854  fprintf(stderr," -drop_gps_time_below 11.125\n");
855  fprintf(stderr," -drop_gps_time_above 130.725\n");
856  fprintf(stderr," -drop_gps_time_between 22.0 48.0\n");
857  fprintf(stderr,"Filter points based on their wavepacket.\n");
858  fprintf(stderr," -keep_wavepacket 1 2\n");
859  fprintf(stderr," -drop_wavepacket 0\n");
860  fprintf(stderr,"Filter points with simple thinning.\n");
861  fprintf(stderr," -keep_every_nth 2\n");
862  fprintf(stderr," -keep_random_fraction 0.1\n");
863  fprintf(stderr," -thin_with_grid 1.0\n");
864 }
865 
867 {
868  int i;
869 
870  U32 keep_return_mask = 0;
871  U32 drop_return_mask = 0;
872 
873  U32 keep_classification_mask = 0;
874  U32 drop_classification_mask = 0;
875 
876  U32 keep_wavepacket_mask = 0;
877  U32 drop_wavepacket_mask = 0;
878 
879  for (i = 1; i < argc; i++)
880  {
881  if (argv[i][0] == '\0')
882  {
883  continue;
884  }
885  else if (strcmp(argv[i],"-h") == 0 || strcmp(argv[i],"-help") == 0)
886  {
887  usage();
888  return TRUE;
889  }
890  else if (strcmp(argv[i],"-clip_tile") == 0)
891  {
892  if ((i+3) >= argc)
893  {
894  fprintf(stderr,"ERROR: '%s' needs 3 arguments: llx lly size\n", argv[i]);
895  return FALSE;
896  }
897  add_criterion(new LAScriterionClipTile((F32)atof(argv[i+1]), (F32)atof(argv[i+2]), (F32)atof(argv[i+3])));
898  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; *argv[i+3]='\0'; i+=3;
899  }
900  else if (strcmp(argv[i],"-clip_circle") == 0)
901  {
902  if ((i+3) >= argc)
903  {
904  fprintf(stderr,"ERROR: '%s' needs 3 arguments: center_x center_y radius\n", argv[i]);
905  return FALSE;
906  }
907  add_criterion(new LAScriterionClipCircle(atof(argv[i+1]), atof(argv[i+2]), atof(argv[i+3])));
908  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; *argv[i+3]='\0'; i+=3;
909  }
910  else if (strcmp(argv[i],"-clip") == 0 || strcmp(argv[i],"-clip_xy") == 0)
911  {
912  if ((i+4) >= argc)
913  {
914  fprintf(stderr,"ERROR: '%s' needs 4 arguments: min_x min_y max_x max_y\n", argv[i]);
915  return FALSE;
916  }
917  add_criterion(new LAScriterionClipXY(atof(argv[i+1]), atof(argv[i+2]), atof(argv[i+3]), atof(argv[i+4])));
918  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; *argv[i+3]='\0'; *argv[i+4]='\0'; i+=4;
919  }
920  else if (strcmp(argv[i],"-clip_z") == 0)
921  {
922  if ((i+2) >= argc)
923  {
924  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min_z max_z\n", argv[i]);
925  return FALSE;
926  }
927  add_criterion(new LAScriterionClipZ(atof(argv[i+1]), atof(argv[i+2])));
928  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
929  }
930  else if (strcmp(argv[i],"-clip_x_below") == 0)
931  {
932  if ((i+1) >= argc)
933  {
934  fprintf(stderr,"ERROR: '%s' needs 1 argument: min_x\n", argv[i]);
935  return FALSE;
936  }
937  add_criterion(new LAScriterionClipXBelow(atof(argv[i+1])));
938  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
939  }
940  else if (strcmp(argv[i],"-clip_y_below") == 0)
941  {
942  if ((i+1) >= argc)
943  {
944  fprintf(stderr,"ERROR: '%s' needs 1 argument: min_y\n", argv[i]);
945  return FALSE;
946  }
947  add_criterion(new LAScriterionClipYBelow(atof(argv[i+1])));
948  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
949  }
950  else if (strcmp(argv[i],"-clip_z_below") == 0)
951  {
952  if ((i+1) >= argc)
953  {
954  fprintf(stderr,"ERROR: '%s' needs 1 argument: min_z\n", argv[i]);
955  return FALSE;
956  }
957  add_criterion(new LAScriterionClipZBelow(atof(argv[i+1])));
958  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
959  }
960  else if (strcmp(argv[i],"-clip_x_above") == 0)
961  {
962  if ((i+1) >= argc)
963  {
964  fprintf(stderr,"ERROR: '%s' needs 1 argument: max_x\n", argv[i]);
965  return FALSE;
966  }
967  add_criterion(new LAScriterionClipXAbove(atof(argv[i+1])));
968  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
969  }
970  else if (strcmp(argv[i],"-clip_y_above") == 0)
971  {
972  if ((i+1) >= argc)
973  {
974  fprintf(stderr,"ERROR: '%s' needs 1 argument: max_y\n", argv[i]);
975  return FALSE;
976  }
977  add_criterion(new LAScriterionClipYAbove(atof(argv[i+1])));
978  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
979  }
980  else if (strcmp(argv[i],"-clip_z_above") == 0)
981  {
982  if ((i+1) >= argc)
983  {
984  fprintf(stderr,"ERROR: '%s' needs 1 argument: max_z\n", argv[i]);
985  return FALSE;
986  }
987  add_criterion(new LAScriterionClipZAbove(atof(argv[i+1])));
988  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
989  }
990  else if (strcmp(argv[i],"-clip_raw") == 0 || strcmp(argv[i],"-clip_raw_xy") == 0)
991  {
992  if ((i+4) >= argc)
993  {
994  fprintf(stderr,"ERROR: '%s' needs 4 arguments: min_raw_x min_raw_y max_raw_x max_raw_y\n", argv[i]);
995  return FALSE;
996  }
997  add_criterion(new LAScriterionClipRawXY(atoi(argv[i+1]), atoi(argv[i+2]), atoi(argv[i+3]), atoi(argv[i+4])));
998  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; *argv[i+3]='\0'; *argv[i+4]='\0'; i+=4;
999  }
1000  else if (strcmp(argv[i],"-clip_raw_z") == 0)
1001  {
1002  if ((i+2) >= argc)
1003  {
1004  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min_raw_z max_raw_z\n", argv[i]);
1005  return FALSE;
1006  }
1007  add_criterion(new LAScriterionClipRawZ(atoi(argv[i+1]), atoi(argv[i+2])));
1008  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
1009  }
1010  else if (strcmp(argv[i],"-clip_raw_x_below") == 0)
1011  {
1012  if ((i+1) >= argc)
1013  {
1014  fprintf(stderr,"ERROR: '%s' needs 1 argument: min_raw_x\n", argv[i]);
1015  return FALSE;
1016  }
1017  add_criterion(new LAScriterionClipRawXBelow(atoi(argv[i+1])));
1018  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1019  }
1020  else if (strcmp(argv[i],"-clip_raw_y_below") == 0)
1021  {
1022  if ((i+1) >= argc)
1023  {
1024  fprintf(stderr,"ERROR: '%s' needs 1 argument: min_raw_y\n", argv[i]);
1025  return FALSE;
1026  }
1027  add_criterion(new LAScriterionClipRawYBelow(atoi(argv[i+1])));
1028  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1029  }
1030  else if (strcmp(argv[i],"-clip_raw_z_below") == 0)
1031  {
1032  if ((i+1) >= argc)
1033  {
1034  fprintf(stderr,"ERROR: '%s' needs 1 argument: min_raw_z\n", argv[i]);
1035  return FALSE;
1036  }
1037  add_criterion(new LAScriterionClipRawZBelow(atoi(argv[i+1])));
1038  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1039  }
1040  else if (strcmp(argv[i],"-clip_raw_x_above") == 0)
1041  {
1042  if ((i+1) >= argc)
1043  {
1044  fprintf(stderr,"ERROR: '%s' needs 1 argument: max_raw_x\n", argv[i]);
1045  return FALSE;
1046  }
1047  add_criterion(new LAScriterionClipRawXAbove(atoi(argv[i+1])));
1048  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1049  }
1050  else if (strcmp(argv[i],"-clip_raw_y_above") == 0)
1051  {
1052  if ((i+1) >= argc)
1053  {
1054  fprintf(stderr,"ERROR: '%s' needs 1 argument: max_raw_y\n", argv[i]);
1055  return FALSE;
1056  }
1057  add_criterion(new LAScriterionClipRawYAbove(atoi(argv[i+1])));
1058  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1059  }
1060  else if (strcmp(argv[i],"-clip_raw_z_above") == 0)
1061  {
1062  if ((i+1) >= argc)
1063  {
1064  fprintf(stderr,"ERROR: '%s' needs 1 argument: max_raw_z\n", argv[i]);
1065  return FALSE;
1066  }
1067  add_criterion(new LAScriterionClipRawZAbove(atoi(argv[i+1])));
1068  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1069  }
1070  else if ((strcmp(argv[i],"-first_only") == 0) || (strcmp(argv[i],"-keep_first") == 0))
1071  {
1073  *argv[i]='\0';
1074  }
1075  else if (strcmp(argv[i],"-keep_middle") == 0)
1076  {
1078  *argv[i]='\0';
1079  }
1080  else if ((strcmp(argv[i],"-last_only") == 0) || (strcmp(argv[i],"-keep_last") == 0))
1081  {
1083  *argv[i]='\0';
1084  }
1085  else if (strcmp(argv[i],"-drop_first") == 0)
1086  {
1088  *argv[i]='\0';
1089  }
1090  else if (strcmp(argv[i],"-drop_middle") == 0)
1091  {
1093  *argv[i]='\0';
1094  }
1095  else if (strcmp(argv[i],"-drop_last") == 0)
1096  {
1098  *argv[i]='\0';
1099  }
1100  else if (strcmp(argv[i],"-keep_return") == 0)
1101  {
1102  if ((i+1) >= argc)
1103  {
1104  fprintf(stderr,"ERROR: '%s' needs at least 1 argument: return_number\n", argv[i]);
1105  return FALSE;
1106  }
1107  *argv[i]='\0';
1108  i+=1;
1109  do
1110  {
1111  keep_return_mask |= (1 << atoi(argv[i]));
1112  *argv[i]='\0';
1113  i+=1;
1114  } while ((i < argc) && ('0' <= *argv[i]) && (*argv[i] <= '9'));
1115  i-=1;
1116  }
1117  else if (strcmp(argv[i],"-keep_return_mask") == 0)
1118  {
1119  if ((i+1) >= argc)
1120  {
1121  fprintf(stderr,"ERROR: '%s' needs 1 argument: return_mask\n", argv[i]);
1122  return FALSE;
1123  }
1124  keep_return_mask = atoi(argv[i+1]);
1125  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1126  }
1127  else if (strcmp(argv[i],"-drop_return") == 0)
1128  {
1129  if ((i+1) >= argc)
1130  {
1131  fprintf(stderr,"ERROR: '%s' needs at least 1 argument: return_number\n", argv[i]);
1132  return FALSE;
1133  }
1134  *argv[i]='\0';
1135  i+=1;
1136  do
1137  {
1138  drop_return_mask |= (1 << atoi(argv[i]));
1139  *argv[i]='\0';
1140  i+=1;
1141  } while ((i < argc) && ('0' <= *argv[i]) && (*argv[i] <= '9'));
1142  i-=1;
1143  }
1144  else if (strcmp(argv[i],"-keep_single") == 0 || strcmp(argv[i],"-single_only") == 0)
1145  {
1147  *argv[i]='\0';
1148  }
1149  else if (strcmp(argv[i],"-keep_double") == 0 || strcmp(argv[i],"-double_only") == 0)
1150  {
1152  *argv[i]='\0';
1153  }
1154  else if (strcmp(argv[i],"-keep_triple") == 0 || strcmp(argv[i],"-triple_only") == 0)
1155  {
1157  *argv[i]='\0';
1158  }
1159  else if (strcmp(argv[i],"-keep_quadruple") == 0 || strcmp(argv[i],"-quadruple_only") == 0)
1160  {
1162  *argv[i]='\0';
1163  }
1164  else if (strcmp(argv[i],"-keep_quintuple") == 0 || strcmp(argv[i],"-quintuple_only") == 0)
1165  {
1167  *argv[i]='\0';
1168  }
1169  else if (strcmp(argv[i],"-drop_single") == 0)
1170  {
1172  *argv[i]='\0';
1173  }
1174  else if (strcmp(argv[i],"-drop_double") == 0)
1175  {
1177  *argv[i]='\0';
1178  }
1179  else if (strcmp(argv[i],"-drop_triple") == 0)
1180  {
1182  *argv[i]='\0';
1183  }
1184  else if (strcmp(argv[i],"-drop_quadruple") == 0)
1185  {
1187  *argv[i]='\0';
1188  }
1189  else if (strcmp(argv[i],"-drop_quintuple") == 0)
1190  {
1192  *argv[i]='\0';
1193  }
1194  else if (strcmp(argv[i],"-drop_scan_direction") == 0)
1195  {
1197  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1198  }
1199  else if (strcmp(argv[i],"-scan_direction_change_only") == 0 || strcmp(argv[i],"-scan_direction_change") == 0)
1200  {
1202  *argv[i]='\0';
1203  }
1204  else if (strcmp(argv[i],"-edge_of_flight_line_only") == 0 || strcmp(argv[i],"-edge_of_flight_line") == 0)
1205  {
1207  *argv[i]='\0';
1208  }
1209  else if (strcmp(argv[i],"-keep_intensity") == 0)
1210  {
1211  if ((i+2) >= argc)
1212  {
1213  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min max\n", argv[i]);
1214  return FALSE;
1215  }
1216  add_criterion(new LAScriterionKeepIntensity(atoi(argv[i+1]), atoi(argv[i+2])));
1217  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
1218  }
1219  else if (strcmp(argv[i],"-drop_intensity_above") == 0)
1220  {
1221  if ((i+1) >= argc)
1222  {
1223  fprintf(stderr,"ERROR: '%s' needs 1 argument: max\n", argv[i]);
1224  return FALSE;
1225  }
1227  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1228  }
1229  else if (strcmp(argv[i],"-drop_intensity_below") == 0)
1230  {
1231  if ((i+1) >= argc)
1232  {
1233  fprintf(stderr,"ERROR: '%s' needs 1 argument: min\n", argv[i]);
1234  return FALSE;
1235  }
1237  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1238  }
1239  else if (strcmp(argv[i],"-drop_intensity_between") == 0)
1240  {
1241  if ((i+2) >= argc)
1242  {
1243  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min max\n", argv[i]);
1244  return FALSE;
1245  }
1246  add_criterion(new LAScriterionDropIntensityBetween(atoi(argv[i+1]), atoi(argv[i+2])));
1247  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
1248  }
1249  else if (strcmp(argv[i],"-keep_scan_angle") == 0 || strcmp(argv[i],"-keep_scan") == 0)
1250  {
1251  if ((i+2) >= argc)
1252  {
1253  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min max\n", argv[i]);
1254  return FALSE;
1255  }
1256  add_criterion(new LAScriterionKeepScanAngle(atoi(argv[i+1]), atoi(argv[i+2])));
1257  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
1258  }
1259  else if (strcmp(argv[i],"-drop_scan_angle_above") == 0 || strcmp(argv[i],"-drop_scan_above") == 0)
1260  {
1261  if ((i+1) >= argc)
1262  {
1263  fprintf(stderr,"ERROR: '%s' needs 1 argument: max\n", argv[i]);
1264  return FALSE;
1265  }
1267  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1268  }
1269  else if (strcmp(argv[i],"-drop_scan_angle_below") == 0 || strcmp(argv[i],"-drop_scan_below") == 0)
1270  {
1271  if ((i+1) >= argc)
1272  {
1273  fprintf(stderr,"ERROR: '%s' needs 1 argument: min\n", argv[i]);
1274  return FALSE;
1275  }
1277  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1278  }
1279  else if (strcmp(argv[i],"-drop_scan_angle_between") == 0 || strcmp(argv[i],"-drop_scan_between") == 0)
1280  {
1281  if ((i+2) >= argc)
1282  {
1283  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min max\n", argv[i]);
1284  return FALSE;
1285  }
1286  add_criterion(new LAScriterionDropScanAngleBetween(atoi(argv[i+1]), atoi(argv[i+2])));
1287  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
1288  }
1289  else if (strcmp(argv[i],"-keep_classification") == 0 || strcmp(argv[i],"-keep_class") == 0)
1290  {
1291  if ((i+1) >= argc)
1292  {
1293  fprintf(stderr,"ERROR: '%s' needs 1 at least argument: classification\n", argv[i]);
1294  return FALSE;
1295  }
1296  *argv[i]='\0';
1297  i+=1;
1298  do
1299  {
1300  keep_classification_mask |= (1 << atoi(argv[i]));
1301  *argv[i]='\0';
1302  i+=1;
1303  } while ((i < argc) && ('0' <= *argv[i]) && (*argv[i] <= '9'));
1304  i-=1;
1305  }
1306  else if (strcmp(argv[i],"-keep_classification_mask") == 0)
1307  {
1308  if ((i+1) >= argc)
1309  {
1310  fprintf(stderr,"ERROR: '%s' needs 1 argument: classifications_mask\n", argv[i]);
1311  return FALSE;
1312  }
1313  keep_classification_mask = atoi(argv[i+1]);
1314  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1315  }
1316  else if (strcmp(argv[i],"-drop_classification") == 0 || strcmp(argv[i],"-drop_class") == 0)
1317  {
1318  if ((i+1) >= argc)
1319  {
1320  fprintf(stderr,"ERROR: '%s' needs at least 1 argument: classification\n", argv[i]);
1321  return FALSE;
1322  }
1323  *argv[i]='\0';
1324  i+=1;
1325  do
1326  {
1327  drop_classification_mask |= (1 << atoi(argv[i]));
1328  *argv[i]='\0';
1329  i+=1;
1330  } while ((i < argc) && ('0' <= *argv[i]) && (*argv[i] <= '9'));
1331  i-=1;
1332  }
1333  else if (strcmp(argv[i],"-keep_wavepacket") == 0)
1334  {
1335  if ((i+1) >= argc)
1336  {
1337  fprintf(stderr,"ERROR: '%s' needs 1 at least argument: index\n", argv[i]);
1338  return FALSE;
1339  }
1340  *argv[i]='\0';
1341  i+=1;
1342  do
1343  {
1344  keep_wavepacket_mask |= (1 << atoi(argv[i]));
1345  *argv[i]='\0';
1346  i+=1;
1347  } while ((i < argc) && ('0' <= *argv[i]) && (*argv[i] <= '9'));
1348  i-=1;
1349  }
1350  else if (strcmp(argv[i],"-drop_wavepacket") == 0)
1351  {
1352  if ((i+1) >= argc)
1353  {
1354  fprintf(stderr,"ERROR: '%s' needs at least 1 argument: index\n", argv[i]);
1355  return FALSE;
1356  }
1357  *argv[i]='\0';
1358  i+=1;
1359  do
1360  {
1361  drop_wavepacket_mask |= (1 << atoi(argv[i]));
1362  *argv[i]='\0';
1363  i+=1;
1364  } while ((i < argc) && ('0' <= *argv[i]) && (*argv[i] <= '9'));
1365  i-=1;
1366  }
1367  else if (strcmp(argv[i],"-keep_point_source") == 0)
1368  {
1369  if ((i+1) >= argc)
1370  {
1371  fprintf(stderr,"ERROR: '%s' needs 1 argument: ID\n", argv[i]);
1372  return FALSE;
1373  }
1375  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1376  }
1377  else if (strcmp(argv[i],"-keep_point_source_between") == 0)
1378  {
1379  if ((i+2) >= argc)
1380  {
1381  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min_ID max_ID\n", argv[i]);
1382  return FALSE;
1383  }
1384  add_criterion(new LAScriterionKeepPointSourceBetween(atoi(argv[i+1]), atoi(argv[i+2])));
1385  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
1386  }
1387  else if (strcmp(argv[i],"-drop_point_source_below") == 0)
1388  {
1389  if ((i+1) >= argc)
1390  {
1391  fprintf(stderr,"ERROR: '%s' needs 1 argument: min_ID\n", argv[i]);
1392  return FALSE;
1393  }
1395  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1396  }
1397  else if (strcmp(argv[i],"-drop_point_source_above") == 0)
1398  {
1399  if ((i+1) >= argc)
1400  {
1401  fprintf(stderr,"ERROR: '%s' needs 1 argument: max_ID\n", argv[i]);
1402  return FALSE;
1403  }
1405  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1406  }
1407  else if (strcmp(argv[i],"-drop_point_source_between") == 0)
1408  {
1409  if ((i+2) >= argc)
1410  {
1411  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min_ID max_ID\n", argv[i]);
1412  return FALSE;
1413  }
1414  add_criterion(new LAScriterionDropPointSourceBetween(atoi(argv[i+1]), atoi(argv[i+2])));
1415  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
1416  }
1417  else if (strcmp(argv[i],"-keep_gps_time") == 0 || strcmp(argv[i],"-keep_gpstime") == 0)
1418  {
1419  if ((i+2) >= argc)
1420  {
1421  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min max\n", argv[i]);
1422  return FALSE;
1423  }
1424  add_criterion(new LAScriterionKeepGpsTime(atof(argv[i+1]), atof(argv[i+2])));
1425  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
1426  }
1427  else if (strcmp(argv[i],"-drop_gps_time_above") == 0 || strcmp(argv[i],"-drop_gpstime_above") == 0)
1428  {
1429  if ((i+1) >= argc)
1430  {
1431  fprintf(stderr,"ERROR: '%s' needs 1 argument: max_gps_time\n", argv[i]);
1432  return FALSE;
1433  }
1435  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1436  }
1437  else if (strcmp(argv[i],"-drop_gps_time_below") == 0 || strcmp(argv[i],"-drop_gpstime_below") == 0)
1438  {
1439  if ((i+1) >= argc)
1440  {
1441  fprintf(stderr,"ERROR: '%s' needs 1 argument: min_gps_time\n", argv[i]);
1442  return FALSE;
1443  }
1445  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1446  }
1447  else if (strcmp(argv[i],"-drop_gps_time_between") == 0 || strcmp(argv[i],"-drop_gpstime_between") == 0)
1448  {
1449  if ((i+2) >= argc)
1450  {
1451  fprintf(stderr,"ERROR: '%s' needs 2 arguments: min max\n", argv[i]);
1452  return FALSE;
1453  }
1454  add_criterion(new LAScriterionDropGpsTimeBetween(atof(argv[i+1]), atof(argv[i+2])));
1455  *argv[i]='\0'; *argv[i+1]='\0'; *argv[i+2]='\0'; i+=2;
1456  }
1457  else if (strcmp(argv[i],"-keep_every_nth") == 0)
1458  {
1459  if ((i+1) >= argc)
1460  {
1461  fprintf(stderr,"ERROR: '%s' needs 1 argument: nth\n", argv[i]);
1462  return FALSE;
1463  }
1464  add_criterion(new LAScriterionKeepEveryNth((I32)atoi(argv[i+1])));
1465  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1466  }
1467  else if (strcmp(argv[i],"-keep_random_fraction") == 0)
1468  {
1469  if ((i+1) >= argc)
1470  {
1471  fprintf(stderr,"ERROR: '%s' needs 1 argument: fraction\n", argv[i]);
1472  return FALSE;
1473  }
1475  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1476  }
1477  else if (strcmp(argv[i],"-thin_with_grid") == 0)
1478  {
1479  if ((i+1) >= argc)
1480  {
1481  fprintf(stderr,"ERROR: '%s' needs 1 argument: grid_spacing\n", argv[i]);
1482  return FALSE;
1483  }
1484  add_criterion(new LAScriterionThinWithGrid((F32)atof(argv[i+1])));
1485  *argv[i]='\0'; *argv[i+1]='\0'; i+=1;
1486  }
1487  }
1488 
1489  if (drop_return_mask)
1490  {
1491  if (keep_return_mask == 0) keep_return_mask = 255 & ~drop_return_mask;
1492  }
1493  if (keep_return_mask) add_criterion(new LAScriterionKeepReturns(keep_return_mask));
1494 
1495  if (drop_classification_mask)
1496  {
1497  if (keep_classification_mask == 0) keep_classification_mask = ~drop_classification_mask;
1498  }
1499  if (keep_classification_mask) add_criterion(new LAScriterionKeepClassifications(keep_classification_mask));
1500 
1501  if (drop_wavepacket_mask)
1502  {
1503  if (keep_wavepacket_mask == 0) keep_wavepacket_mask = ~drop_wavepacket_mask;
1504  }
1505  if (keep_wavepacket_mask) add_criterion(new LAScriterionKeepWavepackets(keep_wavepacket_mask));
1506 
1507  return TRUE;
1508 }
1509 
1510 I32 LASfilter::unparse(char* string) const
1511 {
1512  U32 i;
1513  I32 n = 0;
1514  for (i = 0; i < num_criteria; i++)
1515  {
1516  n += criteria[i]->get_command(&string[n]);
1517  }
1518  return n;
1519 }
1520 
1522 {
1523  add_criterion(new LAScriterionClipCircle(x, y, radius));
1524 }
1525 
1527 {
1529 }
1530 
1532 {
1533  U32 i;
1534 
1535  for (i = 0; i < num_criteria; i++)
1536  {
1537  if (criteria[i]->filter(point))
1538  {
1539  counters[i]++;
1540  return TRUE; // point was filtered
1541  }
1542  }
1543  return FALSE; // point survived
1544 }
1545 
1547 {
1548  U32 i;
1549  for (i = 0; i < num_criteria; i++)
1550  {
1551  criteria[i]->reset();
1552  }
1553 }
1554 
1556 {
1557  alloc_criteria = 0;
1558  num_criteria = 0;
1559  criteria = 0;
1560  counters = 0;
1561 }
1562 
1564 {
1565  if (criteria) clean();
1566 }
1567 
1569 {
1571  {
1572  U32 i;
1573  alloc_criteria += 16;
1574  LAScriterion** temp_criteria = new LAScriterion*[alloc_criteria];
1575  int* temp_counters = new int[alloc_criteria];
1576  if (criteria)
1577  {
1578  for (i = 0; i < num_criteria; i++)
1579  {
1580  temp_criteria[i] = criteria[i];
1581  temp_counters[i] = counters[i];
1582  }
1583  delete [] criteria;
1584  delete [] counters;
1585  }
1586  criteria = temp_criteria;
1587  counters = temp_counters;
1588  }
1589  criteria[num_criteria] = filter_criterion;
1590  counters[num_criteria] = 0;
1591  num_criteria++;
1592 }
LASpoint::edge_of_flight_line
U8 edge_of_flight_line
Definition: lasdefinitions.hpp:485
LAScriterionThinWithGrid::minus_ankers
I32 * minus_ankers
Definition: lasfilter.cpp:774
LAScriterionKeepFirstReturn::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:239
LAScriterionClipRawYBelow::below_y
I32 below_y
Definition: lasfilter.cpp:197
LAScriterionDropPointSourceBetween::above_point_source_id
I32 above_point_source_id
Definition: lasfilter.cpp:498
LAScriterionClipRawZBelow::LAScriterionClipRawZBelow
LAScriterionClipRawZBelow(I32 below_z)
Definition: lasfilter.cpp:219
LAScriterionKeepIntensity::below_intensity
I32 below_intensity
Definition: lasfilter.cpp:397
LAScriterionClipXY::below_y
F64 below_y
Definition: lasfilter.cpp:67
LAScriterionDropPointSourceBelow::below_point_source_id
I32 below_point_source_id
Definition: lasfilter.cpp:474
LAScriterionKeepScanAngle::LAScriterionKeepScanAngle
LAScriterionKeepScanAngle(I32 below_scan, I32 above_scan)
Definition: lasfilter.cpp:353
LAScriterionClipRawZ::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:162
LAScriterionDropGpsTimeBetween::below_gpstime
F64 below_gpstime
Definition: lasfilter.cpp:540
LAScriterionDropIntensityBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:407
LAScriterionClipXY::above_y
F64 above_y
Definition: lasfilter.cpp:67
LAScriterionScanDirectionChangeOnly::LAScriterionScanDirectionChangeOnly
LAScriterionScanDirectionChangeOnly()
Definition: lasfilter.cpp:334
LAScriterionDropIntensityAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:417
LAScriterionDropScanAngleAbove
Definition: lasfilter.cpp:369
LASpoint::gps_time
F64 gps_time
Definition: lasdefinitions.hpp:497
LAScriterionDropGpsTimeAbove::above_gpstime
F64 above_gpstime
Definition: lasfilter.cpp:529
LAScriterionClipRawXBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:173
LAScriterionKeepClassifications::drop_classification_mask
U32 drop_classification_mask
Definition: lasfilter.cpp:441
LAScriterionKeepScanAngle::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:352
LAScriterionThinWithGrid::~LAScriterionThinWithGrid
~LAScriterionThinWithGrid()
Definition: lasfilter.cpp:770
LASpoint::scan_angle_rank
I8 scan_angle_rank
Definition: lasdefinitions.hpp:487
LAScriterionThinWithGrid::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:583
lasfilter.hpp
LAScriterionKeepPointSource::point_source_id
I32 point_source_id
Definition: lasfilter.cpp:452
LASfilter::unparse
int unparse(char *string) const
Definition: lasfilter.cpp:1510
LASfilter::LASfilter
LASfilter()
Definition: lasfilter.cpp:1555
LAScriterionKeepSpecificNumberOfReturns::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:298
LAScriterionDropScanAngleBetween::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:384
LAScriterionDropScanAngleBelow
Definition: lasfilter.cpp:358
LAScriterionThinWithGrid::minus_plus_size
U32 minus_plus_size
Definition: lasfilter.cpp:778
LAScriterionDropGpsTimeAbove::name
const char * name() const
Definition: lasfilter.cpp:526
LAScriterionClipXBelow::below_x
F64 below_x
Definition: lasfilter.cpp:87
LAScriterionClipRawZAbove::name
const char * name() const
Definition: lasfilter.cpp:227
LAScriterionDropGpsTimeBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:517
LAScriterionDropIntensityBetween::LAScriterionDropIntensityBetween
LAScriterionDropIntensityBetween(I32 below_intensity, I32 above_intensity)
Definition: lasfilter.cpp:430
LAScriterionDropScanAngleBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:362
LASpoint::scan_direction_flag
U8 scan_direction_flag
Definition: lasdefinitions.hpp:484
LAScriterionDropPointSourceAbove::above_point_source_id
I32 above_point_source_id
Definition: lasfilter.cpp:485
LAScriterionClipRawZ::name
const char * name() const
Definition: lasfilter.cpp:161
LAScriterionClipRawXBelow::name
const char * name() const
Definition: lasfilter.cpp:172
LASpoint
Definition: lasdefinitions.hpp:472
LAScriterionDropMiddleReturn::name
const char * name() const
Definition: lasfilter.cpp:270
LASpoint::point_source_ID
U16 point_source_ID
Definition: lasdefinitions.hpp:489
LAScriterionDropPointSourceBetween::below_point_source_id
I32 below_point_source_id
Definition: lasfilter.cpp:496
LAScriterionDropScanAngleBelow::below_scan
I32 below_scan
Definition: lasfilter.cpp:364
LAScriterionDropScanDirection::name
const char * name() const
Definition: lasfilter.cpp:319
LAScriterionKeepMiddleReturn::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:248
LAScriterionKeepMiddleReturn::name
const char * name() const
Definition: lasfilter.cpp:246
LASpoint::inside_tile
BOOL inside_tile(const F32 ll_x, const F32 ll_y, const F32 ur_x, const F32 ur_y) const
Definition: lasdefinitions.hpp:713
LAScriterionDropScanAngleAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:373
LAScriterionKeepMiddleReturn
Definition: lasfilter.cpp:243
LAScriterionKeepSpecificNumberOfReturns
Definition: lasfilter.cpp:294
LAScriterionClipYAbove::above_y
F64 above_y
Definition: lasfilter.cpp:120
LAScriterionClipRawYAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:206
LAScriterionClipRawYAbove::LAScriterionClipRawYAbove
LAScriterionClipRawYAbove(I32 above_y)
Definition: lasfilter.cpp:208
LAScriterionThinWithGrid::minus_plus
U32 ** minus_plus
Definition: lasfilter.cpp:779
LAScriterionDropGpsTimeAbove::LAScriterionDropGpsTimeAbove
LAScriterionDropGpsTimeAbove(F64 above_gpstime)
Definition: lasfilter.cpp:529
LAScriterionDropIntensityBelow::name
const char * name() const
Definition: lasfilter.cpp:405
LAScriterionDropFirstReturn
Definition: lasfilter.cpp:259
LAScriterionDropMiddleReturn::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:271
LAScriterionKeepGpsTime::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:505
LAScriterionDropPointSourceAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:484
LAScriterionKeepReturns::LAScriterionKeepReturns
LAScriterionKeepReturns(U32 keep_return_mask)
Definition: lasfilter.cpp:289
LAScriterionClipCircle::radius_squared
F64 radius_squared
Definition: lasfilter.cpp:56
LAScriterionClipRawXAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:184
LAScriterionKeepPointSourceBetween
Definition: lasfilter.cpp:457
LAScriterionKeepScanAngle
Definition: lasfilter.cpp:347
LAScriterionClipCircle
Definition: lasfilter.cpp:48
LAScriterionClipZ
Definition: lasfilter.cpp:70
F64
double F64
Definition: mydefs.hpp:52
LAScriterionDropPointSourceBelow::name
const char * name() const
Definition: lasfilter.cpp:471
LAScriterionKeepGpsTime::above_gpstime
F64 above_gpstime
Definition: lasfilter.cpp:509
LAScriterionKeepGpsTime::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:506
LAScriterionKeepScanAngle::name
const char * name() const
Definition: lasfilter.cpp:350
LAScriterionClipRawZAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:228
LAScriterionDropGpsTimeAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:528
LAScriterionDropLastReturn::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:279
LAScriterionClipRawZBelow::name
const char * name() const
Definition: lasfilter.cpp:216
LAScriterionKeepClassifications::name
const char * name() const
Definition: lasfilter.cpp:438
LAScriterionKeepFirstReturn
Definition: lasfilter.cpp:235
I32
int I32
Definition: mydefs.hpp:35
LAScriterionKeepWavepackets::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:550
LAScriterion
Definition: lasfilter.hpp:36
LAScriterionDropPointSourceBelow::LAScriterionDropPointSourceBelow
LAScriterionDropPointSourceBelow(I32 below_point_source_id)
Definition: lasfilter.cpp:474
LAScriterionClipRawZAbove::above_z
I32 above_z
Definition: lasfilter.cpp:230
LAScriterionDropGpsTimeAbove
Definition: lasfilter.cpp:523
LAScriterionClipZ::above_z
F64 above_z
Definition: lasfilter.cpp:78
LAScriterionThinWithGrid
Definition: lasfilter.cpp:579
LAScriterionClipRawZBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:218
LASpoint::wavepacket
LASwavepacket wavepacket
Definition: lasdefinitions.hpp:499
LAScriterionClipRawZ
Definition: lasfilter.cpp:158
LAScriterionDropScanAngleAbove::name
const char * name() const
Definition: lasfilter.cpp:372
TRUE
#define TRUE
Definition: mydefs.hpp:137
LAScriterionClipXY::above_x
F64 above_x
Definition: lasfilter.cpp:67
LAScriterionClipYBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:107
LAScriterionKeepRandomFraction::fraction
F32 fraction
Definition: lasfilter.cpp:574
LAScriterionClipXAbove::above_x
F64 above_x
Definition: lasfilter.cpp:98
LAScriterionThinWithGrid::plus_ankers
I32 * plus_ankers
Definition: lasfilter.cpp:781
LAScriterionKeepRandomFraction
Definition: lasfilter.cpp:568
LAScriterionClipYBelow::name
const char * name() const
Definition: lasfilter.cpp:106
LAScriterionEdgeOfFlightLineOnly::name
const char * name() const
Definition: lasfilter.cpp:342
LASfilter::clean
void clean()
Definition: lasfilter.cpp:790
LAScriterionClipXY::below_x
F64 below_x
Definition: lasfilter.cpp:65
LAScriterionClipYBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:108
LAScriterionDropScanAngleBetween::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:385
LAScriterionDropScanDirection::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:320
LAScriterionDropScanDirection::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:321
LASfilter::criteria
LAScriterion ** criteria
Definition: lasfilter.hpp:69
LAScriterionKeepClassifications::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:439
LAScriterionClipYBelow
Definition: lasfilter.cpp:103
LAScriterionClipRawYAbove
Definition: lasfilter.cpp:202
LAScriterionKeepWavepackets::drop_wavepacket_mask
U32 drop_wavepacket_mask
Definition: lasfilter.cpp:551
LAScriterionClipTile::name
const char * name() const
Definition: lasfilter.cpp:40
LAScriterionKeepScanAngle::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:351
LAScriterionKeepEveryNth::counter
I32 counter
Definition: lasfilter.cpp:562
LAScriterionDropGpsTimeBetween::LAScriterionDropGpsTimeBetween
LAScriterionDropGpsTimeBetween(F64 below_gpstime, F64 above_gpstime)
Definition: lasfilter.cpp:540
LASfilter::num_criteria
U32 num_criteria
Definition: lasfilter.hpp:67
LAScriterionClipRawYBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:196
LAScriterionKeepLastReturn
Definition: lasfilter.cpp:251
LAScriterionKeepRandomFraction::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:573
LAScriterionClipRawZ::LAScriterionClipRawZ
LAScriterionClipRawZ(I32 below_z, I32 above_z)
Definition: lasfilter.cpp:164
LAScriterionDropScanAngleAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:374
LAScriterionKeepPointSourceBetween::name
const char * name() const
Definition: lasfilter.cpp:460
LAScriterionDropIntensityBetween::below_intensity
I32 below_intensity
Definition: lasfilter.cpp:430
LAScriterionKeepPointSourceBetween::above_point_source_id
I32 above_point_source_id
Definition: lasfilter.cpp:465
LAScriterionClipCircle::center_x
F64 center_x
Definition: lasfilter.cpp:54
LAScriterionClipRawYBelow::name
const char * name() const
Definition: lasfilter.cpp:194
LAScriterionKeepSpecificNumberOfReturns::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:299
LAScriterionClipRawZBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:217
I32_FLOOR
#define I32_FLOOR(n)
Definition: mydefs.hpp:118
LASfilter::add_criterion
void add_criterion(LAScriterion *criterion)
Definition: lasfilter.cpp:1568
LAScriterionClipZ::below_z
F64 below_z
Definition: lasfilter.cpp:76
LAScriterionThinWithGrid::plus_minus_sizes
U16 * plus_minus_sizes
Definition: lasfilter.cpp:784
LAScriterionKeepLastReturn::name
const char * name() const
Definition: lasfilter.cpp:254
LAScriterionClipZAbove::LAScriterionClipZAbove
LAScriterionClipZAbove(F64 above_z)
Definition: lasfilter.cpp:142
LAScriterionClipTile::LAScriterionClipTile
LAScriterionClipTile(F32 ll_x, F32 ll_y, F32 tile_size)
Definition: lasfilter.cpp:43
LAScriterionThinWithGrid::reset
void reset()
Definition: lasfilter.cpp:708
LAScriterionDropPointSourceBetween::name
const char * name() const
Definition: lasfilter.cpp:493
LAScriterion::reset
virtual void reset()
Definition: lasfilter.hpp:42
LAScriterionClipTile::ur_y
F32 ur_y
Definition: lasfilter.cpp:45
LAScriterionClipRawZ::above_z
I32 above_z
Definition: lasfilter.cpp:166
LAScriterionDropGpsTimeBelow::name
const char * name() const
Definition: lasfilter.cpp:515
LASpoint::y
I32 y
Definition: lasdefinitions.hpp:479
LAScriterionClipYAbove::LAScriterionClipYAbove
LAScriterionClipYAbove(F64 above_y)
Definition: lasfilter.cpp:120
LAScriterionKeepGpsTime::name
const char * name() const
Definition: lasfilter.cpp:504
LAScriterionKeepSpecificNumberOfReturns::numberOfReturns
U32 numberOfReturns
Definition: lasfilter.cpp:300
LAScriterionDropPointSourceBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:472
LAScriterionClipRawYBelow
Definition: lasfilter.cpp:191
LAScriterionKeepIntensity::name
const char * name() const
Definition: lasfilter.cpp:394
LASpoint::classification
U8 classification
Definition: lasdefinitions.hpp:486
LAScriterionDropSpecificNumberOfReturns::LAScriterionDropSpecificNumberOfReturns
LAScriterionDropSpecificNumberOfReturns(U32 numberOfReturns)
Definition: lasfilter.cpp:311
LAScriterionKeepReturns::drop_return_mask
U32 drop_return_mask
Definition: lasfilter.cpp:289
LAScriterionDropIntensityBetween::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:429
LAScriterionThinWithGrid::plus_plus
U32 ** plus_plus
Definition: lasfilter.cpp:786
LAScriterionKeepClassifications::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:440
LAScriterionDropIntensityBetween
Definition: lasfilter.cpp:424
LAScriterionClipZAbove::above_z
F64 above_z
Definition: lasfilter.cpp:142
LAScriterionDropGpsTimeAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:527
LAScriterionClipXY
Definition: lasfilter.cpp:59
LAScriterionClipRawXAbove::above_x
I32 above_x
Definition: lasfilter.cpp:186
LAScriterionClipRawXY::below_y
I32 below_y
Definition: lasfilter.cpp:155
LAScriterionClipRawZ::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:163
LAScriterionClipRawXY
Definition: lasfilter.cpp:147
LASpoint::return_number
U8 return_number
Definition: lasdefinitions.hpp:482
LAScriterionDropScanAngleBetween
Definition: lasfilter.cpp:380
LAScriterionKeepScanAngle::below_scan
I32 below_scan
Definition: lasfilter.cpp:353
LAScriterionThinWithGrid::plus_plus_size
U32 plus_plus_size
Definition: lasfilter.cpp:785
LAScriterionClipYAbove
Definition: lasfilter.cpp:114
LAScriterionDropSpecificNumberOfReturns
Definition: lasfilter.cpp:305
LAScriterionDropLastReturn::name
const char * name() const
Definition: lasfilter.cpp:278
LAScriterionDropIntensityBelow::below_intensity
I32 below_intensity
Definition: lasfilter.cpp:408
LAScriterionClipRawXY::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:151
LAScriterionClipRawXY::name
const char * name() const
Definition: lasfilter.cpp:150
LAScriterionScanDirectionChangeOnly::name
const char * name() const
Definition: lasfilter.cpp:330
LAScriterionKeepFirstReturn::name
const char * name() const
Definition: lasfilter.cpp:238
LASpoint::inside_circle
BOOL inside_circle(const F64 center_x, const F64 center_y, F64 squared_radius) const
Definition: lasdefinitions.hpp:723
LAScriterionClipTile::ll_x
F32 ll_x
Definition: lasfilter.cpp:43
LAScriterionDropGpsTimeBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:516
LAScriterionDropScanAngleAbove::above_scan
I32 above_scan
Definition: lasfilter.cpp:375
LAScriterionClipCircle::LAScriterionClipCircle
LAScriterionClipCircle(F64 x, F64 y, F64 radius)
Definition: lasfilter.cpp:54
LAScriterionDropIntensityAbove
Definition: lasfilter.cpp:413
LAScriterionClipZ::name
const char * name() const
Definition: lasfilter.cpp:73
LAScriterionClipZBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:129
LAScriterionClipRawXAbove::LAScriterionClipRawXAbove
LAScriterionClipRawXAbove(I32 above_x)
Definition: lasfilter.cpp:186
LASfilter::parse
BOOL parse(int argc, char *argv[])
Definition: lasfilter.cpp:866
LAScriterionKeepGpsTime::LAScriterionKeepGpsTime
LAScriterionKeepGpsTime(F64 below_gpstime, F64 above_gpstime)
Definition: lasfilter.cpp:507
LAScriterionKeepMiddleReturn::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:247
LAScriterionThinWithGrid::minus_minus_size
U32 minus_minus_size
Definition: lasfilter.cpp:775
LAScriterionClipRawXY::above_x
I32 above_x
Definition: lasfilter.cpp:155
LAScriterionKeepIntensity::above_intensity
I32 above_intensity
Definition: lasfilter.cpp:399
LAScriterionDropSpecificNumberOfReturns::name
const char * name() const
Definition: lasfilter.cpp:308
LAScriterionDropGpsTimeBetween::above_gpstime
F64 above_gpstime
Definition: lasfilter.cpp:542
LAScriterionDropPointSourceBetween::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:495
LAScriterionDropScanAngleBelow::name
const char * name() const
Definition: lasfilter.cpp:361
LAScriterionDropSpecificNumberOfReturns::numberOfReturns
U32 numberOfReturns
Definition: lasfilter.cpp:311
LAScriterionClipYAbove::name
const char * name() const
Definition: lasfilter.cpp:117
LASfilter::~LASfilter
~LASfilter()
Definition: lasfilter.cpp:1563
LAScriterionDropPointSourceAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:483
LAScriterionDropIntensityBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:406
LAScriterionThinWithGrid::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:584
LAScriterionClipTile::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:41
LAScriterionScanDirectionChangeOnly::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:332
LASpoint::get_y
F64 get_y() const
Definition: lasdefinitions.hpp:812
LAScriterionClipXY::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:63
LAScriterionClipZAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:140
LAScriterionDropIntensityBetween::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:428
LAScriterionClipZAbove::name
const char * name() const
Definition: lasfilter.cpp:139
LAScriterionKeepClassifications
Definition: lasfilter.cpp:435
LAScriterionDropGpsTimeBetween::name
const char * name() const
Definition: lasfilter.cpp:537
LAScriterionKeepPointSource::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:451
LAScriterionKeepGpsTime
Definition: lasfilter.cpp:501
LAScriterionClipRawXBelow::LAScriterionClipRawXBelow
LAScriterionClipRawXBelow(I32 below_x)
Definition: lasfilter.cpp:175
LAScriterionDropPointSourceBetween::LAScriterionDropPointSourceBetween
LAScriterionDropPointSourceBetween(I32 below_point_source_id, I32 above_point_source_id)
Definition: lasfilter.cpp:496
LAScriterionEdgeOfFlightLineOnly::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:343
LAScriterionDropScanAngleBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:363
LAScriterionDropScanAngleBetween::name
const char * name() const
Definition: lasfilter.cpp:383
LAScriterionClipRawYBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:195
LAScriterionKeepPointSourceBetween::below_point_source_id
I32 below_point_source_id
Definition: lasfilter.cpp:463
LAScriterionDropIntensityAbove::LAScriterionDropIntensityAbove
LAScriterionDropIntensityAbove(I32 above_intensity)
Definition: lasfilter.cpp:419
LAScriterionClipZAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:141
LAScriterionClipTile::ll_y
F32 ll_y
Definition: lasfilter.cpp:45
LAScriterionClipCircle::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:52
U16
unsigned short U16
Definition: mydefs.hpp:40
LAScriterionClipYBelow::LAScriterionClipYBelow
LAScriterionClipYBelow(F64 below_y)
Definition: lasfilter.cpp:109
LAScriterionClipXBelow::LAScriterionClipXBelow
LAScriterionClipXBelow(F64 below_x)
Definition: lasfilter.cpp:87
LAScriterionDropPointSourceBelow
Definition: lasfilter.cpp:468
LAScriterionKeepEveryNth::LAScriterionKeepEveryNth
LAScriterionKeepEveryNth(I32 every)
Definition: lasfilter.cpp:562
LAScriterionClipXAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:96
LAScriterionDropMiddleReturn
Definition: lasfilter.cpp:267
LAScriterionKeepRandomFraction::LAScriterionKeepRandomFraction
LAScriterionKeepRandomFraction(F32 fraction)
Definition: lasfilter.cpp:574
LAScriterionKeepPointSource::name
const char * name() const
Definition: lasfilter.cpp:449
LAScriterionClipTile::tile_size
F32 tile_size
Definition: lasfilter.cpp:45
LAScriterionClipRawYAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:207
LAScriterionKeepClassifications::LAScriterionKeepClassifications
LAScriterionKeepClassifications(U32 keep_classification_mask)
Definition: lasfilter.cpp:441
LAScriterionClipXAbove::name
const char * name() const
Definition: lasfilter.cpp:95
LAScriterionDropIntensityBelow
Definition: lasfilter.cpp:402
LAScriterionKeepPointSourceBetween::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:462
LASfilter::addScanDirectionChangeOnly
void addScanDirectionChangeOnly()
Definition: lasfilter.cpp:1526
LAScriterionThinWithGrid::plus_plus_sizes
U16 * plus_plus_sizes
Definition: lasfilter.cpp:787
LAScriterionKeepEveryNth::every
I32 every
Definition: lasfilter.cpp:565
LAScriterionClipRawZAbove::LAScriterionClipRawZAbove
LAScriterionClipRawZAbove(I32 above_z)
Definition: lasfilter.cpp:230
LASpoint::have_gps_time
BOOL have_gps_time
Definition: lasdefinitions.hpp:517
LAScriterionClipTile::ur_x
F32 ur_x
Definition: lasfilter.cpp:45
LAScriterionEdgeOfFlightLineOnly::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:344
LAScriterionDropIntensityBelow::LAScriterionDropIntensityBelow
LAScriterionDropIntensityBelow(I32 below_intensity)
Definition: lasfilter.cpp:408
LAScriterionDropIntensityAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:418
LAScriterionDropFirstReturn::name
const char * name() const
Definition: lasfilter.cpp:262
LASpoint::inside_rectangle
BOOL inside_rectangle(const F64 r_min_x, const F64 r_min_y, const F64 r_max_x, const F64 r_max_y) const
Definition: lasdefinitions.hpp:703
LAScriterionClipZBelow
Definition: lasfilter.cpp:125
LAScriterionDropPointSourceAbove::name
const char * name() const
Definition: lasfilter.cpp:482
LAScriterionDropMiddleReturn::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:272
LAScriterionClipRawZAbove
Definition: lasfilter.cpp:224
LAScriterionClipTile::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:42
LAScriterionDropGpsTimeBetween::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:539
LAScriterionDropIntensityBetween::above_intensity
I32 above_intensity
Definition: lasfilter.cpp:432
LAScriterionKeepReturns::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:287
LAScriterionClipRawXY::LAScriterionClipRawXY
LAScriterionClipRawXY(I32 below_x, I32 below_y, I32 above_x, I32 above_y)
Definition: lasfilter.cpp:153
LASfilter::counters
int * counters
Definition: lasfilter.hpp:70
LAScriterionKeepLastReturn::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:255
LAScriterionDropPointSourceBetween::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:494
BOOL
int BOOL
Definition: mydefs.hpp:57
LASpoint::z
I32 z
Definition: lasdefinitions.hpp:480
LASfilter::usage
void usage() const
Definition: lasfilter.cpp:805
LAScriterionDropPointSourceAbove::LAScriterionDropPointSourceAbove
LAScriterionDropPointSourceAbove(I32 above_point_source_id)
Definition: lasfilter.cpp:485
LAScriterionKeepReturns::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:288
argc
int argc
Definition: tests_high_five_parallel.cpp:27
LAScriterionKeepEveryNth
Definition: lasfilter.cpp:556
LAScriterionDropLastReturn
Definition: lasfilter.cpp:275
LAScriterionDropScanAngleBetween::above_scan
I32 above_scan
Definition: lasfilter.cpp:388
FALSE
#define FALSE
Definition: mydefs.hpp:133
LAScriterionKeepWavepackets
Definition: lasfilter.cpp:545
F32
float F32
Definition: mydefs.hpp:51
LAScriterionDropScanDirection::LAScriterionDropScanDirection
LAScriterionDropScanDirection(I32 scan_direction)
Definition: lasfilter.cpp:322
LAScriterionDropScanDirection::scan_direction
I32 scan_direction
Definition: lasfilter.cpp:322
LAScriterionKeepRandomFraction::name
const char * name() const
Definition: lasfilter.cpp:571
LAScriterionClipZ::LAScriterionClipZ
LAScriterionClipZ(F64 below_z, F64 above_z)
Definition: lasfilter.cpp:76
LAScriterionDropSpecificNumberOfReturns::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:309
LAScriterionThinWithGrid::grid_spacing
F32 grid_spacing
Definition: lasfilter.cpp:770
LAScriterionKeepWavepackets::LAScriterionKeepWavepackets
LAScriterionKeepWavepackets(U32 keep_wavepacket_mask)
Definition: lasfilter.cpp:551
LAScriterionKeepRandomFraction::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:572
LAScriterionClipRawZ::below_z
I32 below_z
Definition: lasfilter.cpp:164
LAScriterionThinWithGrid::plus_minus_size
U32 plus_minus_size
Definition: lasfilter.cpp:782
LAScriterionClipZ::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:75
LAScriterionKeepSpecificNumberOfReturns::LAScriterionKeepSpecificNumberOfReturns
LAScriterionKeepSpecificNumberOfReturns(U32 numberOfReturns)
Definition: lasfilter.cpp:300
LAScriterionClipXBelow
Definition: lasfilter.cpp:81
LAScriterionClipRawXAbove
Definition: lasfilter.cpp:180
LAScriterionClipRawZAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:229
LASfilter::alloc_criteria
U32 alloc_criteria
Definition: lasfilter.hpp:68
LAScriterionDropFirstReturn::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:263
LAScriterionKeepPointSource::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:450
LAScriterionDropIntensityAbove::above_intensity
I32 above_intensity
Definition: lasfilter.cpp:419
LAScriterionDropIntensityBetween::name
const char * name() const
Definition: lasfilter.cpp:427
LAScriterionKeepFirstReturn::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:240
LAScriterionClipRawZBelow
Definition: lasfilter.cpp:213
LAScriterionDropScanAngleBetween::below_scan
I32 below_scan
Definition: lasfilter.cpp:386
LAScriterionClipZBelow::below_z
F64 below_z
Definition: lasfilter.cpp:131
LAScriterionClipTile
Definition: lasfilter.cpp:37
LAScriterionKeepEveryNth::name
const char * name() const
Definition: lasfilter.cpp:559
LAScriterionKeepLastReturn::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:256
LAScriterionKeepPointSource::LAScriterionKeepPointSource
LAScriterionKeepPointSource(I32 point_source_id)
Definition: lasfilter.cpp:452
LAScriterionThinWithGrid::minus_plus_sizes
U16 * minus_plus_sizes
Definition: lasfilter.cpp:780
LAScriterionKeepScanAngle::above_scan
I32 above_scan
Definition: lasfilter.cpp:355
LAScriterionKeepIntensity::LAScriterionKeepIntensity
LAScriterionKeepIntensity(I32 below_intensity, I32 above_intensity)
Definition: lasfilter.cpp:397
LASpoint::number_of_returns_of_given_pulse
U8 number_of_returns_of_given_pulse
Definition: lasdefinitions.hpp:483
LAScriterionScanDirectionChangeOnly
Definition: lasfilter.cpp:327
LAScriterionDropLastReturn::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:280
LAScriterionClipZBelow::LAScriterionClipZBelow
LAScriterionClipZBelow(F64 below_z)
Definition: lasfilter.cpp:131
LAScriterionKeepGpsTime::below_gpstime
F64 below_gpstime
Definition: lasfilter.cpp:507
LAScriterionClipZ::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:74
LAScriterion::get_command
virtual int get_command(char *string) const =0
LASfilter::addClipCircle
void addClipCircle(F64 x, F64 y, F64 radius)
Definition: lasfilter.cpp:1521
LAScriterionClipZAbove
Definition: lasfilter.cpp:136
LAScriterionClipXBelow::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:85
LAScriterionClipRawYAbove::name
const char * name() const
Definition: lasfilter.cpp:205
LAScriterionClipRawXBelow::below_x
I32 below_x
Definition: lasfilter.cpp:175
LAScriterionClipXY::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:64
LAScriterionKeepWavepackets::name
const char * name() const
Definition: lasfilter.cpp:548
LAScriterionClipRawYBelow::LAScriterionClipRawYBelow
LAScriterionClipRawYBelow(I32 below_y)
Definition: lasfilter.cpp:197
LAScriterionDropGpsTimeBetween
Definition: lasfilter.cpp:534
LAScriterionClipXY::name
const char * name() const
Definition: lasfilter.cpp:62
U32
unsigned int U32
Definition: mydefs.hpp:39
LAScriterionClipYAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:119
LASwavepacket::getIndex
U8 getIndex() const
Definition: lasdefinitions.hpp:70
LAScriterionScanDirectionChangeOnly::scan_direction_flag
I32 scan_direction_flag
Definition: lasfilter.cpp:334
LAScriterionDropPointSourceBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:473
LAScriterionClipRawXBelow
Definition: lasfilter.cpp:169
LAScriterionClipZBelow::name
const char * name() const
Definition: lasfilter.cpp:128
LAScriterionScanDirectionChangeOnly::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:331
LASpoint::x
I32 x
Definition: lasdefinitions.hpp:478
LAScriterionClipYBelow::below_y
F64 below_y
Definition: lasfilter.cpp:109
LAScriterionClipXAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:97
LASfilter::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:1531
LASpoint::get_z
F64 get_z() const
Definition: lasdefinitions.hpp:813
LAScriterionClipXBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:86
LAScriterionDropIntensityAbove::name
const char * name() const
Definition: lasfilter.cpp:416
LAScriterionDropGpsTimeBelow::LAScriterionDropGpsTimeBelow
LAScriterionDropGpsTimeBelow(F64 below_gpstime)
Definition: lasfilter.cpp:518
LAScriterionScanDirectionChangeOnly::reset
void reset()
Definition: lasfilter.cpp:333
LAScriterionKeepPointSourceBetween::LAScriterionKeepPointSourceBetween
LAScriterionKeepPointSourceBetween(I32 below_point_source_id, I32 above_point_source_id)
Definition: lasfilter.cpp:463
LASpoint::get_x
F64 get_x() const
Definition: lasdefinitions.hpp:811
LAScriterionClipRawYAbove::above_y
I32 above_y
Definition: lasfilter.cpp:208
LAScriterionDropSpecificNumberOfReturns::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:310
LAScriterionDropFirstReturn::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:264
LAScriterionDropScanAngleBetween::LAScriterionDropScanAngleBetween
LAScriterionDropScanAngleBetween(I32 below_scan, I32 above_scan)
Definition: lasfilter.cpp:386
LAScriterionKeepPointSourceBetween::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:461
LAScriterionThinWithGrid::LAScriterionThinWithGrid
LAScriterionThinWithGrid(F32 grid_spacing)
Definition: lasfilter.cpp:752
LAScriterionClipYAbove::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:118
LAScriterionClipCircle::center_y
F64 center_y
Definition: lasfilter.cpp:56
LAScriterionKeepReturns::name
const char * name() const
Definition: lasfilter.cpp:286
LAScriterionKeepIntensity::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:396
LAScriterionClipRawXAbove::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:185
LAScriterionClipXAbove
Definition: lasfilter.cpp:92
LAScriterionKeepSpecificNumberOfReturns::name
const char * name() const
Definition: lasfilter.cpp:297
LAScriterionClipRawXAbove::name
const char * name() const
Definition: lasfilter.cpp:183
LAScriterionThinWithGrid::minus_minus_sizes
U16 * minus_minus_sizes
Definition: lasfilter.cpp:777
LAScriterionKeepEveryNth::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:560
LASfilter::reset
void reset()
Definition: lasfilter.cpp:1546
LAScriterionThinWithGrid::plus_minus
U32 ** plus_minus
Definition: lasfilter.cpp:783
LAScriterionKeepWavepackets::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:549
LAScriterionClipCircle::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:53
LAScriterionClipRawXY::below_x
I32 below_x
Definition: lasfilter.cpp:153
LAScriterionEdgeOfFlightLineOnly
Definition: lasfilter.cpp:339
LAScriterionDropGpsTimeBelow
Definition: lasfilter.cpp:512
LAScriterionDropPointSourceBetween
Definition: lasfilter.cpp:490
LAScriterionDropGpsTimeBelow::below_gpstime
F64 below_gpstime
Definition: lasfilter.cpp:518
LAScriterionClipCircle::radius
F64 radius
Definition: lasfilter.cpp:56
LAScriterionClipZBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:130
LAScriterionClipRawXBelow::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:174
LAScriterionKeepIntensity
Definition: lasfilter.cpp:391
LAScriterionThinWithGrid::name
const char * name() const
Definition: lasfilter.cpp:582
LAScriterionKeepPointSource
Definition: lasfilter.cpp:446
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28
LAScriterionDropScanAngleBelow::LAScriterionDropScanAngleBelow
LAScriterionDropScanAngleBelow(I32 below_scan)
Definition: lasfilter.cpp:364
LAScriterionDropScanAngleAbove::LAScriterionDropScanAngleAbove
LAScriterionDropScanAngleAbove(I32 above_scan)
Definition: lasfilter.cpp:375
LAScriterionDropPointSourceAbove
Definition: lasfilter.cpp:479
LAScriterionThinWithGrid::anker
I32 anker
Definition: lasfilter.cpp:773
LAScriterionClipRawXY::above_y
I32 above_y
Definition: lasfilter.cpp:155
LAScriterionClipXAbove::LAScriterionClipXAbove
LAScriterionClipXAbove(F64 above_x)
Definition: lasfilter.cpp:98
LAScriterionClipXY::LAScriterionClipXY
LAScriterionClipXY(F64 below_x, F64 below_y, F64 above_x, F64 above_y)
Definition: lasfilter.cpp:65
LAScriterionThinWithGrid::minus_minus
U32 ** minus_minus
Definition: lasfilter.cpp:776
LAScriterionClipCircle::name
const char * name() const
Definition: lasfilter.cpp:51
LAScriterionKeepIntensity::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:395
LAScriterionClipRawXY::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:152
LAScriterionKeepEveryNth::filter
BOOL filter(const LASpoint *point)
Definition: lasfilter.cpp:561
LASpoint::intensity
U16 intensity
Definition: lasdefinitions.hpp:481
LAScriterionClipRawZBelow::below_z
I32 below_z
Definition: lasfilter.cpp:219
LAScriterionKeepReturns
Definition: lasfilter.cpp:283
LAScriterionDropGpsTimeBetween::get_command
int get_command(char *string) const
Definition: lasfilter.cpp:538
LAScriterionDropScanDirection
Definition: lasfilter.cpp:316
LAScriterionClipXBelow::name
const char * name() const
Definition: lasfilter.cpp:84


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