| 88 | |
| 89 | |
| 90 | int TileKernel::execute() |
| 91 | { |
| 92 | const StringList& files = Utils::glob(m_inputFile); |
| 93 | if (files.empty()) |
| 94 | throw pdal_error("No input files found for path '" + |
| 95 | m_inputFile + "'."); |
| 96 | |
| 97 | Readers readers; |
| 98 | for (auto&& file : files) |
| 99 | readers[file] = prepareReader(file); |
| 100 | checkReaders(readers); |
| 101 | if (m_repro) |
| 102 | m_repro->prepare(m_table); |
| 103 | Options opts; |
| 104 | opts.add("length", m_length); |
| 105 | opts.add("buffer", m_buffer); |
| 106 | m_splitter.setOptions(opts); |
| 107 | m_splitter.prepare(m_table); |
| 108 | |
| 109 | m_table.finalize(); |
| 110 | process(readers); |
| 111 | StageWrapper::done(m_splitter, m_table); |
| 112 | for (auto&& wp : m_writers) |
| 113 | StageWrapper::done(*wp.second, m_table); |
| 114 | return 0; |
| 115 | } |
| 116 | |
| 117 | |
| 118 | void TileKernel::checkReaders(const Readers& readers) |