laszip.cpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: laszip.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) 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 "laszip.hpp"
32 #include "mydefs.hpp"
33 #include <assert.h>
34 
35 #include <string.h>
36 #include <stdlib.h>
37 #include <stdio.h>
38 
40 {
46  options = 0;
47  num_items = 0;
49  num_points = -1;
50  num_bytes = -1;
51  error_string = 0;
52  items = 0;
53  bytes = 0;
54 }
55 
57 {
58  if (error_string) free(error_string);
59  if (items) delete [] items;
60  if (bytes) delete [] bytes;
61 }
62 
63 // the data of the LASzip VLR
64 // U16 compressor 2 bytes
65 // U16 coder 2 bytes
66 // U8 version_major 1 byte
67 // U8 version_minor 1 byte
68 // U16 version_revision 2 bytes
69 // U32 options 4 bytes
70 // U32 chunk_size 4 bytes
71 // I64 num_points 8 bytes
72 // I64 num_bytes 8 bytes
73 // U16 num_items 2 bytes
74 // U16 type 2 bytes * num_items
75 // U16 size 2 bytes * num_items
76 // U16 version 2 bytes * num_items
77 // which totals 34+6*num_items
78 
79 // unpack from VLR data
80 bool LASzip::unpack(const U8* bytes, const I32 num)
81 {
82  // check input
83  if (num < 34) return return_error("too few bytes to unpack");
84  if (((num - 34) % 6) != 0) return return_error("wrong number bytes to unpack");
85  if (((num - 34) / 6) == 0) return return_error("zero items to unpack");
86  num_items = (num - 34) / 6;
87 
88  // create item list
89  if (items) delete [] items;
90  items = new LASitem[num_items];
91 
92  // do the unpacking
93  U16 i;
94  const U8* b = bytes;
95  compressor = *((U16*)b);
96  b += 2;
97  coder = *((U16*)b);
98  b += 2;
99  version_major = *((U8*)b);
100  b += 1;
101  version_minor = *((U8*)b);
102  b += 1;
103  version_revision = *((U16*)b);
104  b += 2;
105  options = *((U32*)b);
106  b += 4;
107  chunk_size = *((U32*)b);
108  b += 4;
109  num_points = *((I64*)b);
110  b += 8;
111  num_bytes = *((I64*)b);
112  b += 8;
113  num_items = *((U16*)b);
114  b += 2;
115  for (i = 0; i < num_items; i++)
116  {
117  items[i].type = (LASitem::Type)*((U16*)b);
118  b += 2;
119  items[i].size = *((U16*)b);
120  b += 2;
121  items[i].version = *((U16*)b);
122  b += 2;
123  }
124  assert((bytes + num) == b);
125 
126  // check if we support the contents
127 
128  for (i = 0; i < num_items; i++)
129  {
130  if (!check_item(&items[i])) return false;
131  }
132  return true;
133 }
134 
135 // pack to VLR data
136 bool LASzip::pack(U8*& bytes, I32& num)
137 {
138  // check if we support the contents
139  if (!check()) return false;
140 
141  // prepare output
142  num = 34 + 6*num_items;
143  if (this->bytes) delete [] this->bytes;
144  this->bytes = bytes = new U8[num];
145 
146  // pack
147  U16 i;
148  U8* b = bytes;
149  *((U16*)b) = compressor;
150  b += 2;
151  *((U16*)b) = coder;
152  b += 2;
153  *((U8*)b) = version_major;
154  b += 1;
155  *((U8*)b) = version_minor;
156  b += 1;
157  *((U16*)b) = version_revision;
158  b += 2;
159  *((U32*)b) = options;
160  b += 4;
161  *((U32*)b) = chunk_size;
162  b += 4;
163  *((I64*)b) = num_points;
164  b += 8;
165  *((I64*)b) = num_bytes;
166  b += 8;
167  *((U16*)b) = num_items;
168  b += 2;
169  for (i = 0; i < num_items; i++)
170  {
171  *((U16*)b) = (U16)items[i].type;
172  b += 2;
173  *((U16*)b) = items[i].size;
174  b += 2;
175  *((U16*)b) = items[i].version;
176  b += 2;
177  }
178  assert((bytes + num) == b);
179  return true;
180 }
181 
182 const char* LASzip::get_error() const
183 {
184  return error_string;
185 }
186 
187 bool LASzip::return_error(const char* error)
188 {
189  char err[256];
190  sprintf(err, "%s (LASzip v%d.%dr%d)", error, LASZIP_VERSION_MAJOR, LASZIP_VERSION_MINOR, LASZIP_VERSION_REVISION);
191  if (error_string) free(error_string);
192  error_string = strdup(err);
193  return false;
194 }
195 
196 bool LASzip::check_compressor(const U16 compressor)
197 {
199  char error[64];
200  sprintf(error, "compressor %d not supported", compressor);
201  return return_error(error);
202 }
203 
204 bool LASzip::check_coder(const U16 coder)
205 {
206  if (coder < LASZIP_CODER_TOTAL_NUMBER_OF) return true;
207  char error[64];
208  sprintf(error, "coder %d not supported", coder);
209  return return_error(error);
210 }
211 
212 bool LASzip::check_item(const LASitem* item)
213 {
214  switch (item->type)
215  {
216  case LASitem::POINT10:
217  if (item->size != 20) return return_error("POINT10 has size != 20");
218  if (item->version > 2) return return_error("POINT10 has version > 2");
219  break;
220  case LASitem::GPSTIME11:
221  if (item->size != 8) return return_error("GPSTIME11 has size != 8");
222  if (item->version > 2) return return_error("GPSTIME11 has version > 2");
223  break;
224  case LASitem::RGB12:
225  if (item->size != 6) return return_error("RGB12 has size != 6");
226  if (item->version > 2) return return_error("RGB12 has version > 2");
227  break;
229  if (item->size != 29) return return_error("WAVEPACKET13 has size != 29");
230  if (item->version > 1) return return_error("WAVEPACKET13 has version > 1");
231  break;
232  case LASitem::BYTE:
233  if (item->size < 1) return return_error("BYTE has size < 1");
234  if (item->version > 2) return return_error("BYTE has version > 2");
235  break;
236  case LASitem::POINT14:
237  if (item->size != 30) return return_error("POINT14 has size != 30");
238  if (item->version > 0) return return_error("POINT14 has version > 0");
239  break;
240  case LASitem::RGBNIR14:
241  if (item->size != 8) return return_error("RGBNIR14 has size != 8");
242  if (item->version > 0) return return_error("RGBNIR14 has version > 0");
243  break;
244  default:
245  if (1)
246  {
247  char error[64];
248  sprintf(error, "item unknown (%d,%d,%d)", item->type, item->size, item->version);
249  return return_error(error);
250  }
251  }
252  return true;
253 }
254 
255 bool LASzip::check_items(const U16 num_items, const LASitem* items)
256 {
257  if (num_items == 0) return return_error("number of items cannot be zero");
258  if (items == 0) return return_error("items pointer cannot be NULL");
259  U16 i;
260  for (i = 0; i < num_items; i++)
261  {
262  if (!check_item(&items[i])) return false;
263  }
264  return true;
265 }
266 
268 {
269  if (!check_compressor(compressor)) return false;
270  if (!check_coder(coder)) return false;
271  if (!check_items(num_items, items)) return false;
272  return true;
273 }
274 
275 bool LASzip::setup(const U8 point_type, const U16 point_size, const U16 compressor)
276 {
277  if (!check_compressor(compressor)) return false;
278  this->num_items = 0;
279  if (this->items) delete [] this->items;
280  this->items = 0;
281  if (!setup(&num_items, &items, point_type, point_size, compressor)) return false;
282  this->compressor = compressor;
283  if (this->compressor == LASZIP_COMPRESSOR_POINTWISE_CHUNKED)
284  {
286  }
287  return true;
288 }
289 
290 bool LASzip::setup(const U16 num_items, const LASitem* items, const U16 compressor)
291 {
292  // check input
293  if (!check_compressor(compressor)) return false;
294  if (!check_items(num_items, items)) return false;
295 
296  // setup compressor
297  this->compressor = compressor;
298  if (this->compressor == LASZIP_COMPRESSOR_POINTWISE_CHUNKED)
299  {
301  }
302 
303  // prepare items
304  this->num_items = 0;
305  if (this->items) delete [] this->items;
306  this->items = 0;
307  this->num_items = num_items;
308  this->items = new LASitem[num_items];
309 
310  // setup items
311  U16 i;
312  for (i = 0; i < num_items; i++)
313  {
314  this->items[i] = items[i];
315  }
316 
317  return true;
318 }
319 
320 bool LASzip::setup(U16* num_items, LASitem** items, const U8 point_type, const U16 point_size, const U16 compressor)
321 {
322  BOOL have_point14 = FALSE;
323  BOOL have_gps_time = FALSE;
324  BOOL have_rgb = FALSE;
325  BOOL have_nir = FALSE;
326  BOOL have_wavepacket = FALSE;
327  I32 extra_bytes_number = 0;
328 
329  // switch over the point types we know
330  switch (point_type)
331  {
332  case 0:
333  extra_bytes_number = (I32)point_size - 20;
334  break;
335  case 1:
336  have_gps_time = TRUE;
337  extra_bytes_number = (I32)point_size - 28;
338  break;
339  case 2:
340  have_rgb = TRUE;
341  extra_bytes_number = (I32)point_size - 26;
342  break;
343  case 3:
344  have_gps_time = TRUE;
345  have_rgb = TRUE;
346  extra_bytes_number = (I32)point_size - 34;
347  break;
348  case 4:
349  have_gps_time = TRUE;
350  have_wavepacket = TRUE;
351  extra_bytes_number = (I32)point_size - 57;
352  break;
353  case 5:
354  have_gps_time = TRUE;
355  have_rgb = TRUE;
356  have_wavepacket = TRUE;
357  extra_bytes_number = (I32)point_size - 63;
358  break;
359  case 6:
360  have_point14 = TRUE;
361  extra_bytes_number = (I32)point_size - 30;
362  break;
363  case 7:
364  have_point14 = TRUE;
365  have_rgb = TRUE;
366  extra_bytes_number = (I32)point_size - 36;
367  break;
368  case 8:
369  have_point14 = TRUE;
370  have_rgb = TRUE;
371  have_nir = TRUE;
372  extra_bytes_number = (I32)point_size - 38;
373  break;
374  case 9:
375  have_point14 = TRUE;
376  have_wavepacket = TRUE;
377  extra_bytes_number = (I32)point_size - 59;
378  break;
379  case 10:
380  have_point14 = TRUE;
381  have_rgb = TRUE;
382  have_nir = TRUE;
383  have_wavepacket = TRUE;
384  extra_bytes_number = (I32)point_size - 67;
385  break;
386  default:
387  if (1)
388  {
389  char error[64];
390  sprintf(error, "point type %d unknown", point_type);
391  return return_error(error);
392  }
393  }
394 
395  if (extra_bytes_number < 0)
396  {
397  char error[64];
398  sprintf(error, "point size %d too small for point type %d by %d bytes", point_size, point_type, -extra_bytes_number);
399  return return_error(error);
400  }
401 
402  // create item description
403 
404  (*num_items) = 1 + !!(have_gps_time) + !!(have_rgb) + !!(have_wavepacket) + !!(extra_bytes_number);
405  (*items) = new LASitem[*num_items];
406 
407  U16 i = 1;
408  if (have_point14)
409  {
410  (*items)[0].type = LASitem::POINT14;
411  (*items)[0].size = 30;
412  (*items)[0].version = 0;
413  }
414  else
415  {
416  (*items)[0].type = LASitem::POINT10;
417  (*items)[0].size = 20;
418  (*items)[0].version = 0;
419  }
420  if (have_gps_time)
421  {
422  (*items)[i].type = LASitem::GPSTIME11;
423  (*items)[i].size = 8;
424  (*items)[i].version = 0;
425  i++;
426  }
427  if (have_rgb)
428  {
429  if (have_nir)
430  {
431  (*items)[i].type = LASitem::RGBNIR14;
432  (*items)[i].size = 8;
433  (*items)[i].version = 0;
434  }
435  else
436  {
437  (*items)[i].type = LASitem::RGB12;
438  (*items)[i].size = 6;
439  (*items)[i].version = 0;
440  i++;
441  }
442  }
443  if (have_wavepacket)
444  {
445  (*items)[i].type = LASitem::WAVEPACKET13;
446  (*items)[i].size = 29;
447  (*items)[i].version = 0;
448  i++;
449  }
450  if (extra_bytes_number)
451  {
452  (*items)[i].type = LASitem::BYTE;
453  (*items)[i].size = extra_bytes_number;
454  (*items)[i].version = 0;
455  i++;
456  }
457  if (compressor) request_version(2);
458  assert(i == *num_items);
459  return true;
460 }
461 
462 bool LASzip::set_chunk_size(const U32 chunk_size)
463 {
464  if (num_items == 0) return return_error("call setup() before setting chunk size");
466  {
467  this->chunk_size = chunk_size;
468  return true;
469  }
470  return false;
471 }
472 
473 bool LASzip::request_version(const U16 requested_version)
474 {
475  if (num_items == 0) return return_error("call setup() before requesting version");
477  {
478  if (requested_version > 0) return return_error("without compression version is always 0");
479  }
480  else
481  {
482  if (requested_version < 1) return return_error("with compression version is at least 1");
483  if (requested_version > 2) return return_error("version larger than 2 not supported");
484  }
485  U16 i;
486  for (i = 0; i < num_items; i++)
487  {
488  switch (items[i].type)
489  {
490  case LASitem::POINT10:
491  case LASitem::GPSTIME11:
492  case LASitem::RGB12:
493  case LASitem::BYTE:
494  items[i].version = requested_version;
495  break;
497  items[i].version = 1; // no version 2
498  break;
499  default:
500  return return_error("itrm type not supported");
501  }
502  }
503  return true;
504 }
505 
506 bool LASzip::is_standard(U8* point_type, U16* record_length)
507 {
508  return is_standard(num_items, items, point_type, record_length);
509 }
510 
511 bool LASzip::is_standard(const U16 num_items, const LASitem* items, U8* point_type, U16* record_length)
512 {
513  if (items == 0) return return_error("LASitem array is zero");
514 
515  // this is always true
516  if (point_type) *point_type = 127;
517  if (record_length)
518  {
519  U16 i;
520  *record_length = 0;
521  for (i = 0; i < num_items; i++)
522  {
523  *record_length += items[i].size;
524  }
525  }
526 
527  // the minimal number of items is 1
528  if (num_items < 1) return return_error("less than one LASitem entries");
529  // the maximal number of items is 5
530  if (num_items > 5) return return_error("more than five LASitem entries");
531 
532  if (items[0].is_type(LASitem::POINT10))
533  {
534  // consider all the POINT10 combinations
535  if (num_items == 1)
536  {
537  if (point_type) *point_type = 0;
538  if (record_length) assert(*record_length == 20);
539  return true;
540  }
541  else
542  {
543  if (items[1].is_type(LASitem::GPSTIME11))
544  {
545  if (num_items == 2)
546  {
547  if (point_type) *point_type = 1;
548  if (record_length) assert(*record_length == 28);
549  return true;
550  }
551  else
552  {
553  if (items[2].is_type(LASitem::RGB12))
554  {
555  if (num_items == 3)
556  {
557  if (point_type) *point_type = 3;
558  if (record_length) assert(*record_length == 34);
559  return true;
560  }
561  else
562  {
563  if (items[3].is_type(LASitem::WAVEPACKET13))
564  {
565  if (num_items == 4)
566  {
567  if (point_type) *point_type = 5;
568  if (record_length) assert(*record_length == 63);
569  return true;
570  }
571  else
572  {
573  if (items[4].is_type(LASitem::BYTE))
574  {
575  if (num_items == 5)
576  {
577  if (point_type) *point_type = 5;
578  if (record_length) assert(*record_length == (63 + items[4].size));
579  return true;
580  }
581  }
582  }
583  }
584  else if (items[3].is_type(LASitem::BYTE))
585  {
586  if (num_items == 4)
587  {
588  if (point_type) *point_type = 3;
589  if (record_length) assert(*record_length == (34 + items[3].size));
590  return true;
591  }
592  }
593  }
594  }
595  else if (items[2].is_type(LASitem::WAVEPACKET13))
596  {
597  if (num_items == 3)
598  {
599  if (point_type) *point_type = 4;
600  if (record_length) assert(*record_length == 57);
601  return true;
602  }
603  else
604  {
605  if (items[3].is_type(LASitem::BYTE))
606  {
607  if (num_items == 4)
608  {
609  if (point_type) *point_type = 4;
610  if (record_length) assert(*record_length == (57 + items[3].size));
611  return true;
612  }
613  }
614  }
615  }
616  else if (items[2].is_type(LASitem::BYTE))
617  {
618  if (num_items == 3)
619  {
620  if (point_type) *point_type = 1;
621  if (record_length) assert(*record_length == (28 + items[2].size));
622  return true;
623  }
624  }
625  }
626  }
627  else if (items[1].is_type(LASitem::RGB12))
628  {
629  if (num_items == 2)
630  {
631  if (point_type) *point_type = 2;
632  if (record_length) assert(*record_length == 26);
633  return true;
634  }
635  else
636  {
637  if (items[2].is_type(LASitem::BYTE))
638  {
639  if (num_items == 3)
640  {
641  if (point_type) *point_type = 2;
642  if (record_length) assert(*record_length == (26 + items[2].size));
643  return true;
644  }
645  }
646  }
647  }
648  else if (items[1].is_type(LASitem::BYTE))
649  {
650  if (num_items == 2)
651  {
652  if (point_type) *point_type = 0;
653  if (record_length) assert(*record_length == (20 + items[1].size));
654  return true;
655  }
656  }
657  }
658  }
659  else if (items[0].is_type(LASitem::POINT14))
660  {
661  // consider all the POINT14 combinations
662  if (num_items == 1)
663  {
664  if (point_type) *point_type = 6;
665  if (record_length) assert(*record_length == 30);
666  return true;
667  }
668  else
669  {
670  if (items[1].is_type(LASitem::RGB12))
671  {
672  if (num_items == 2)
673  {
674  if (point_type) *point_type = 7;
675  if (record_length) assert(*record_length == 36);
676  return true;
677  }
678  else
679  {
680  if (items[2].is_type(LASitem::BYTE))
681  {
682  if (num_items == 3)
683  {
684  if (point_type) *point_type = 7;
685  if (record_length) assert(*record_length == (36 + items[2].size));
686  return true;
687  }
688  }
689  }
690  }
691  else if (items[1].is_type(LASitem::RGBNIR14))
692  {
693  if (num_items == 2)
694  {
695  if (point_type) *point_type = 8;
696  if (record_length) assert(*record_length == 38);
697  return true;
698  }
699  else
700  {
701  if (items[2].is_type(LASitem::WAVEPACKET13))
702  {
703  if (num_items == 3)
704  {
705  if (point_type) *point_type = 10;
706  if (record_length) assert(*record_length == 67);
707  return true;
708  }
709  else
710  {
711  if (items[3].is_type(LASitem::BYTE))
712  {
713  if (num_items == 4)
714  {
715  if (point_type) *point_type = 10;
716  if (record_length) assert(*record_length == (67 + items[3].size));
717  return true;
718  }
719  }
720  }
721  }
722  else if (items[2].is_type(LASitem::BYTE))
723  {
724  if (num_items == 3)
725  {
726  if (point_type) *point_type = 8;
727  if (record_length) assert(*record_length == (38 + items[2].size));
728  return true;
729  }
730  }
731  }
732  }
733  else if (items[1].is_type(LASitem::WAVEPACKET13))
734  {
735  if (num_items == 2)
736  {
737  if (point_type) *point_type = 9;
738  if (record_length) assert(*record_length == 59);
739  return true;
740  }
741  else
742  {
743  if (items[2].is_type(LASitem::BYTE))
744  {
745  if (num_items == 3)
746  {
747  if (point_type) *point_type = 9;
748  if (record_length) assert(*record_length == (59 + items[2].size));
749  return true;
750  }
751  }
752  }
753  }
754  else if (items[1].is_type(LASitem::BYTE))
755  {
756  if (num_items == 2)
757  {
758  if (point_type) *point_type = 6;
759  if (record_length) assert(*record_length == (30 + items[1].size));
760  return true;
761  }
762  }
763  }
764  }
765  else
766  {
767  return_error("first LASitem is neither POINT10 nor POINT14");
768  }
769  return return_error("LASitem array does not match LAS specification 1.4");
770 }
771 
773 {
774  if (t != type) return false;
775  switch (t)
776  {
777  case POINT10:
778  if (size != 20) return false;
779  break;
780  case GPSTIME11:
781  if (size != 8) return false;
782  break;
783  case RGB12:
784  if (size != 6) return false;
785  break;
786  case WAVEPACKET13:
787  if (size != 29) return false;
788  break;
789  case BYTE:
790  if (size < 1) return false;
791  break;
792  default:
793  return false;
794  }
795  return true;
796 }
797 
798 const char* LASitem::get_name() const
799 {
800  switch (type)
801  {
802  case POINT10:
803  return "POINT10";
804  break;
805  case GPSTIME11:
806  return "GPSTIME11";
807  break;
808  case RGB12:
809  return "RGB12";
810  break;
811  case WAVEPACKET13:
812  return "WAVEPACKET13";
813  break;
814  case BYTE:
815  return "BYTE";
816  break;
817  default:
818  break;
819  }
820  return 0;
821 }
822 
LASitem::version
unsigned short version
Definition: laszip.hpp:75
LASzip::num_items
unsigned short num_items
Definition: laszip.hpp:120
LASzip::unpack
bool unpack(const unsigned char *bytes, const int num)
Definition: laszip.cpp:80
LASzip::LASzip
LASzip()
Definition: laszip.cpp:39
LASzip::setup
bool setup(unsigned short *num_items, LASitem **items, const unsigned char point_type, const unsigned short point_size, const unsigned short compressor=LASZIP_COMPRESSOR_NONE)
Definition: laszip.cpp:320
LASzip::check_item
bool check_item(const LASitem *item)
Definition: laszip.cpp:212
LASitem::get_name
const char * get_name() const
Definition: laszip.cpp:798
LASZIP_COMPRESSOR_NONE
#define LASZIP_COMPRESSOR_NONE
Definition: laszip.hpp:53
LASitem::POINT10
@ POINT10
Definition: laszip.hpp:73
LASitem::Type
Type
Definition: laszip.hpp:73
I64
long long I64
Definition: mydefs.hpp:48
LASzip::version_revision
unsigned short version_revision
Definition: laszip.hpp:115
I32
int I32
Definition: mydefs.hpp:35
LASzip::check
bool check()
Definition: laszip.cpp:267
LASZIP_COMPRESSOR_POINTWISE_CHUNKED
#define LASZIP_COMPRESSOR_POINTWISE_CHUNKED
Definition: laszip.hpp:55
TRUE
#define TRUE
Definition: mydefs.hpp:137
LASZIP_COMPRESSOR_DEFAULT
#define LASZIP_COMPRESSOR_DEFAULT
Definition: laszip.hpp:61
LASzip::check_coder
bool check_coder(const unsigned short coder)
Definition: laszip.cpp:204
LASZIP_CODER_ARITHMETIC
#define LASZIP_CODER_ARITHMETIC
Definition: laszip.hpp:63
LASzip::items
LASitem * items
Definition: laszip.hpp:121
LASzip::is_standard
bool is_standard(const unsigned short num_items, const LASitem *items, unsigned char *point_type=0, unsigned short *record_length=0)
Definition: laszip.cpp:511
LASitem::WAVEPACKET13
@ WAVEPACKET13
Definition: laszip.hpp:73
LASitem::POINT14
@ POINT14
Definition: laszip.hpp:73
LASZIP_VERSION_REVISION
#define LASZIP_VERSION_REVISION
Definition: laszip.hpp:51
LASitem::is_type
bool is_type(LASitem::Type t) const
Definition: laszip.cpp:772
LASZIP_VERSION_MINOR
#define LASZIP_VERSION_MINOR
Definition: laszip.hpp:50
LASzip::return_error
bool return_error(const char *err)
Definition: laszip.cpp:187
LASzip::check_compressor
bool check_compressor(const unsigned short compressor)
Definition: laszip.cpp:196
LASzip::chunk_size
unsigned int chunk_size
Definition: laszip.hpp:117
LASzip::version_major
unsigned char version_major
Definition: laszip.hpp:113
LASzip::request_version
bool request_version(const unsigned short requested_version)
Definition: laszip.cpp:473
LASzip::compressor
unsigned short compressor
Definition: laszip.hpp:111
LASitem
Definition: laszip.hpp:70
LASzip::num_points
SIGNED_INT64 num_points
Definition: laszip.hpp:118
LASzip::set_chunk_size
bool set_chunk_size(const unsigned int chunk_size)
Definition: laszip.cpp:462
LASitem::RGB12
@ RGB12
Definition: laszip.hpp:73
LASzip::version_minor
unsigned char version_minor
Definition: laszip.hpp:114
LASitem::size
unsigned short size
Definition: laszip.hpp:74
mydefs.hpp
U16
unsigned short U16
Definition: mydefs.hpp:40
LASZIP_VERSION_MAJOR
#define LASZIP_VERSION_MAJOR
Definition: laszip.hpp:49
LASzip::error_string
char * error_string
Definition: laszip.hpp:128
U8
unsigned char U8
Definition: mydefs.hpp:41
BOOL
int BOOL
Definition: mydefs.hpp:57
LASzip::check_items
bool check_items(const unsigned short num_items, const LASitem *items)
Definition: laszip.cpp:255
FALSE
#define FALSE
Definition: mydefs.hpp:133
LASitem::GPSTIME11
@ GPSTIME11
Definition: laszip.hpp:73
LASitem::RGBNIR14
@ RGBNIR14
Definition: laszip.hpp:73
LASitem::BYTE
@ BYTE
Definition: laszip.hpp:73
kfusion::cuda::error
KF_EXPORTS void error(const char *error_string, const char *file, const int line, const char *func="")
Error handler. All GPU functions from this subsystem call the function to report an error....
Definition: device_memory.cpp:7
LASitem::type
enum LASitem::Type type
U32
unsigned int U32
Definition: mydefs.hpp:39
LASzip::num_bytes
SIGNED_INT64 num_bytes
Definition: laszip.hpp:119
LASzip::~LASzip
~LASzip()
Definition: laszip.cpp:56
LASZIP_CHUNK_SIZE_DEFAULT
#define LASZIP_CHUNK_SIZE_DEFAULT
Definition: laszip.hpp:66
LASzip::bytes
unsigned char * bytes
Definition: laszip.hpp:97
LASZIP_COMPRESSOR_TOTAL_NUMBER_OF
#define LASZIP_COMPRESSOR_TOTAL_NUMBER_OF
Definition: laszip.hpp:56
LASzip::get_error
const char * get_error() const
Definition: laszip.cpp:182
LASzip::pack
bool pack(unsigned char *&bytes, int &num)
Definition: laszip.cpp:136
LASzip::coder
unsigned short coder
Definition: laszip.hpp:112
laszip.hpp
LASzip::options
unsigned int options
Definition: laszip.hpp:116
LASZIP_CODER_TOTAL_NUMBER_OF
#define LASZIP_CODER_TOTAL_NUMBER_OF
Definition: laszip.hpp:64


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:24