MCPcopy Create free account
hub / github.com/LAStools/LAStools / setup

Method setup

LASzip/src/laszip.cpp:326–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326bool LASzip::setup(const U8 point_type, const U16 point_size, const U16 compressor)
327{
328 if (!check_compressor(compressor)) return false;
329 this->num_items = 0;
330 if (this->items) delete [] this->items;
331 this->items = 0;
332 if (!setup(&num_items, &items, point_type, point_size, compressor)) return false;
333 if (compressor)
334 {
335 if (items[0].type == LASitem::POINT14)
336 {
337 if (compressor != LASZIP_COMPRESSOR_LAYERED_CHUNKED)
338 {
339 return false;
340 }
341 this->compressor = LASZIP_COMPRESSOR_LAYERED_CHUNKED;
342 }
343 else
344 {
345 if (compressor == LASZIP_COMPRESSOR_LAYERED_CHUNKED)
346 {
347 this->compressor = LASZIP_COMPRESSOR_CHUNKED;
348 }
349 else
350 {
351 this->compressor = compressor;
352 }
353 }
354 if (compressor != LASZIP_COMPRESSOR_POINTWISE)
355 {
356 if (chunk_size == 0) chunk_size = LASZIP_CHUNK_SIZE_DEFAULT;
357 }
358 }
359 else
360 {
361 this->compressor = LASZIP_COMPRESSOR_NONE;
362 }
363 return true;
364}
365
366bool LASzip::setup(const U16 num_items, const LASitem* items, const U16 compressor)
367{

Callers 15

mainFunction · 0.45
mainFunction · 0.45
openMethod · 0.45
create_point_writerFunction · 0.45
setup_laszip_itemsFunction · 0.45
laszip_read_headerFunction · 0.45
openMethod · 0.45
initFunction · 0.45
mainFunction · 0.45
openMethod · 0.45

Calls 1

LASMessageFunction · 0.85

Tested by

no test coverage detected