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

Method open

LASlib/src/lasreadermerged.cpp:643–1255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

641}
642
643BOOL LASreaderMerged::open()
644{
645 if (file_name_number == 0)
646 {
647 laserror("no valid file names");
648 return FALSE;
649 }
650
651 // allocate space for the individual bounding_boxes
652 if (bounding_boxes) delete[] bounding_boxes;
653 bounding_boxes = new F64[file_name_number * 4];
654
655 // clean header
656 header.clean();
657
658 // combine all headers
659
660 U32 i, j;
661 BOOL first = TRUE;
662 BOOL attributes = FALSE;
663
664 BOOL gps_week_warning = FALSE;
665 BOOL gps_non_week_warning = FALSE;
666
667 for (i = 0; i < file_name_number; i++)
668 {
669 // open the lasreader with the next file name
670 if (lasreaderlas)
671 {
672 if (!lasreaderlas->open(file_names[i], 512, (first == FALSE) && (attributes == FALSE))) // starting from second just "peek" into file to get bounding box and count
673 {
674 laserror("could not open lasreaderlas for file '%s'", file_names[i]);
675 return FALSE;
676 }
677 }
678 else if (lasreaderbin)
679 {
680 if (!lasreaderbin->open(file_names[i]))
681 {
682 laserror("could not open lasreaderbin for file '%s'", file_names[i]);
683 return FALSE;
684 }
685 }
686 else if (lasreadershp)
687 {
688 if (!lasreadershp->open(file_names[i]))
689 {
690 laserror("could not open lasreadershp for file '%s'", file_names[i]);
691 return FALSE;
692 }
693 }
694 else if (lasreaderasc)
695 {
696 if (!lasreaderasc->open(file_names[i]))
697 {
698 laserror("could not open lasreaderasc for file '%s'", file_names[i]);
699 return FALSE;
700 }

Callers 1

open_next_fileMethod · 0.45

Calls 11

laserrorFunction · 0.85
LASMessageFunction · 0.85
cleanMethod · 0.45
set_scale_intensityMethod · 0.45
set_scale_scan_angleMethod · 0.45
set_scale_factorMethod · 0.45
set_offsetMethod · 0.45
closeMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected