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

Method init

LASzip/src/laswriteitemcompressed_v3.cpp:378–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

seekMethod · 0.45

Tested by

no test coverage detected