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

Method open_next_file

LASlib/src/lasreadermerged.cpp:1512–1725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1510}
1511
1512BOOL LASreaderMerged::open_next_file()
1513{
1514 while (file_name_current < file_name_number)
1515 {
1516 if (inside)
1517 {
1518 // check if bounding box overlaps requested bounding box
1519 if (inside < 3) // tile or circle
1520 {
1521 if (bounding_boxes[4 * file_name_current + 0] >= header.max_x)
1522 {
1523 file_name_current++;
1524 continue;
1525 }
1526 if (bounding_boxes[4 * file_name_current + 1] >= header.max_y)
1527 {
1528 file_name_current++;
1529 continue;
1530 }
1531 }
1532 else // rectangle
1533 {
1534 if (bounding_boxes[4 * file_name_current + 0] > header.max_x)
1535 {
1536 file_name_current++;
1537 continue;
1538 }
1539 if (bounding_boxes[4 * file_name_current + 1] > header.max_y)
1540 {
1541 file_name_current++;
1542 continue;
1543 }
1544 }
1545 if (bounding_boxes[4 * file_name_current + 2] < header.min_x)
1546 {
1547 file_name_current++;
1548 continue;
1549 }
1550 if (bounding_boxes[4 * file_name_current + 3] < header.min_y)
1551 {
1552 file_name_current++;
1553 continue;
1554 }
1555 }
1556 // open the lasreader with the next file name
1557 if (lasreaderlas)
1558 {
1559 lasreaderlas->set_index(0);
1560 lasreaderlas->set_copcindex(0);
1561
1562 if (!lasreaderlas->open(file_names[file_name_current], io_ibuffer_size))
1563 {
1564 laserror("could not open lasreaderlas for file '%s'", file_names[file_name_current]);
1565 return FALSE;
1566 }
1567
1568 LASindex* index = new LASindex;
1569 if (index->read(file_names[file_name_current]))

Callers

nothing calls this directly

Calls 13

laserrorFunction · 0.85
LASMessageFunction · 0.85
setPointSourceMethod · 0.80
set_indexMethod · 0.45
set_copcindexMethod · 0.45
openMethod · 0.45
readMethod · 0.45
set_filterMethod · 0.45
set_transformMethod · 0.45
inside_rectangleMethod · 0.45
inside_tileMethod · 0.45
inside_circleMethod · 0.45

Tested by

no test coverage detected