| 390 | } |
| 391 | |
| 392 | BOOL LASwritePoint::done() |
| 393 | { |
| 394 | if (writers == writers_compressed) |
| 395 | { |
| 396 | if (layered_las14_compression) |
| 397 | { |
| 398 | U32 i; |
| 399 | // write how many points are in the chunk |
| 400 | outstream->put32bitsLE((U8*)&chunk_count); |
| 401 | // write all layers |
| 402 | for (i = 0; i < num_writers; i++) |
| 403 | { |
| 404 | ((LASwriteItemCompressed*)writers[i])->chunk_sizes(); |
| 405 | } |
| 406 | for (i = 0; i < num_writers; i++) |
| 407 | { |
| 408 | ((LASwriteItemCompressed*)writers[i])->chunk_bytes(); |
| 409 | } |
| 410 | } |
| 411 | else |
| 412 | { |
| 413 | enc->done(); |
| 414 | } |
| 415 | if (chunk_start_position) |
| 416 | { |
| 417 | if (chunk_count) add_chunk_to_table(); |
| 418 | return write_chunk_table(); |
| 419 | } |
| 420 | } |
| 421 | else if (writers == 0) |
| 422 | { |
| 423 | if (chunk_start_position) |
| 424 | { |
| 425 | return write_chunk_table(); |
| 426 | } |
| 427 | } |
| 428 | |
| 429 | return TRUE; |
| 430 | } |
| 431 | |
| 432 | BOOL LASwritePoint::add_chunk_to_table() |
| 433 | { |
no test coverage detected