| 373 | } |
| 374 | |
| 375 | BOOL LASwriteItemCompressed_POINT14_v4::init(const U8* item, U32& context) |
| 376 | { |
| 377 | /* on the first init create outstreams and encoders */ |
| 378 | |
| 379 | if (outstream_channel_returns_XY == 0) |
| 380 | { |
| 381 | if (Endian::IS_LITTLE_ENDIAN) |
| 382 | { |
| 383 | outstream_channel_returns_XY = new ByteStreamOutArrayLE(); |
| 384 | outstream_Z = new ByteStreamOutArrayLE(); |
| 385 | outstream_classification = new ByteStreamOutArrayLE(); |
| 386 | outstream_flags = new ByteStreamOutArrayLE(); |
| 387 | outstream_intensity = new ByteStreamOutArrayLE(); |
| 388 | outstream_scan_angle = new ByteStreamOutArrayLE(); |
| 389 | outstream_user_data = new ByteStreamOutArrayLE(); |
| 390 | outstream_point_source = new ByteStreamOutArrayLE(); |
| 391 | outstream_gps_time = new ByteStreamOutArrayLE(); |
| 392 | } |
| 393 | else |
| 394 | { |
| 395 | outstream_channel_returns_XY = new ByteStreamOutArrayBE(); |
| 396 | outstream_Z = new ByteStreamOutArrayBE(); |
| 397 | outstream_classification = new ByteStreamOutArrayBE(); |
| 398 | outstream_flags = new ByteStreamOutArrayBE(); |
| 399 | outstream_intensity = new ByteStreamOutArrayBE(); |
| 400 | outstream_scan_angle = new ByteStreamOutArrayBE(); |
| 401 | outstream_user_data = new ByteStreamOutArrayBE(); |
| 402 | outstream_point_source = new ByteStreamOutArrayBE(); |
| 403 | outstream_gps_time = new ByteStreamOutArrayBE(); |
| 404 | } |
| 405 | |
| 406 | /* create layer encoders */ |
| 407 | |
| 408 | enc_channel_returns_XY = new ArithmeticEncoder(); |
| 409 | enc_Z = new ArithmeticEncoder(); |
| 410 | enc_classification = new ArithmeticEncoder(); |
| 411 | enc_flags = new ArithmeticEncoder(); |
| 412 | enc_intensity = new ArithmeticEncoder(); |
| 413 | enc_scan_angle = new ArithmeticEncoder(); |
| 414 | enc_user_data = new ArithmeticEncoder(); |
| 415 | enc_point_source = new ArithmeticEncoder(); |
| 416 | enc_gps_time = new ArithmeticEncoder(); |
| 417 | } |
| 418 | else |
| 419 | { |
| 420 | /* otherwise just seek back */ |
| 421 | |
| 422 | outstream_channel_returns_XY->seek(0); |
| 423 | outstream_Z->seek(0); |
| 424 | outstream_classification->seek(0); |
| 425 | outstream_flags->seek(0); |
| 426 | outstream_intensity->seek(0); |
| 427 | outstream_scan_angle->seek(0); |
| 428 | outstream_user_data->seek(0); |
| 429 | outstream_point_source->seek(0); |
| 430 | outstream_gps_time->seek(0); |
| 431 | } |
| 432 |
no test coverage detected