| 1510 | } |
| 1511 | |
| 1512 | BOOL 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])) |
nothing calls this directly
no test coverage detected