MCPcopy Create free account
hub / github.com/PDAL/PDAL / main

Function main

examples/writing/tutorial.cpp:35–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35int 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}

Callers

nothing calls this directly

Calls 7

fillViewFunction · 0.85
registerDimMethod · 0.80
createStageMethod · 0.80
setOptionsMethod · 0.80
addMethod · 0.45
prepareMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected