| 33 | |
| 34 | |
| 35 | int main(int argc, char* argv[]) |
| 36 | { |
| 37 | using namespace pdal; |
| 38 | |
| 39 | Options options; |
| 40 | options.add("filename", "myfile.las"); |
| 41 | |
| 42 | PointTable table; |
| 43 | table.layout()->registerDim(Dimension::Id::X); |
| 44 | table.layout()->registerDim(Dimension::Id::Y); |
| 45 | table.layout()->registerDim(Dimension::Id::Z); |
| 46 | |
| 47 | PointViewPtr view(new PointView(table)); |
| 48 | |
| 49 | fillView(view); |
| 50 | |
| 51 | BufferReader reader; |
| 52 | reader.addView(view); |
| 53 | |
| 54 | StageFactory factory; |
| 55 | |
| 56 | // StageFactory always "owns" stages it creates. They'll be destroyed with the factory. |
| 57 | Stage *writer = factory.createStage("writers.las"); |
| 58 | |
| 59 | writer->setInput(reader); |
| 60 | writer->setOptions(options); |
| 61 | writer->prepare(table); |
| 62 | writer->execute(table); |
| 63 | } |
nothing calls this directly
no test coverage detected