| 643 | |
| 644 | |
| 645 | void TIndexKernel::getFileInfo(FileInfo& fileInfo) |
| 646 | { |
| 647 | PipelineManager manager; |
| 648 | manager.commonOptions() = m_manager.commonOptions(); |
| 649 | manager.stageOptions() = m_manager.stageOptions(); |
| 650 | |
| 651 | // Need to make sure options get set. |
| 652 | Stage& reader = manager.makeReader(fileInfo.m_filename, ""); |
| 653 | |
| 654 | // If we aren't able to make a hexbin filter, we |
| 655 | // will just do a simple fast_boundary. |
| 656 | bool fast(m_fastBoundary); |
| 657 | if (!fast) |
| 658 | { |
| 659 | TindexBoundary hexer{m_density, m_edgeLength, m_sampleSize}; |
| 660 | if (m_boundaryExpr.size()) |
| 661 | { |
| 662 | Options opts; |
| 663 | opts.add("where", m_boundaryExpr); |
| 664 | hexer.addOptions(opts); |
| 665 | } |
| 666 | hexer.setInput(reader); |
| 667 | manager.addStage(&hexer); |
| 668 | try |
| 669 | { |
| 670 | manager.execute(ExecMode::PreferStream); |
| 671 | |
| 672 | fileInfo.m_boundary = hexer.toWKT(); |
| 673 | fileInfo.m_srs = hexer.getSpatialReference().getWKT(); |
| 674 | fileInfo.m_gridHeight = hexer.height(); |
| 675 | } |
| 676 | catch(pdal_error& e) |
| 677 | { |
| 678 | fast = true; |
| 679 | m_log->get(LogLevel::Warning) << "Unable to create exact boundary for tile " << |
| 680 | fileInfo.m_filename << " with error: '" << e.what() << std::endl; |
| 681 | } |
| 682 | } |
| 683 | |
| 684 | if (fast) |
| 685 | fastBoundary(reader, fileInfo); |
| 686 | } |
| 687 | |
| 688 | |
| 689 | bool TIndexKernel::openDataset(const std::string& filename) |
nothing calls this directly
no test coverage detected