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

Method execute

kernels/GroundKernel.cpp:109–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109int GroundKernel::execute()
110{
111 ColumnPointTable table;
112
113 Options assignOptions;
114 assignOptions.add("assignment", "Classification[:]=0");
115
116 Options outlierOptions;
117
118 Options groundOptions;
119 groundOptions.add("window", m_args->maxWindowSize);
120 groundOptions.add("threshold", m_args->threshold);
121 groundOptions.add("slope", m_args->slope);
122 groundOptions.add("cell", m_args->cellSize);
123 groundOptions.add("cut", m_args->cut);
124 groundOptions.add("scalar", m_args->scalar);
125 for (auto& s: m_args->returns)
126 groundOptions.add("returns", s);
127 for(DimRange& r: m_args->ignored)
128 groundOptions.add("ignore", r);
129
130 Options rangeOptions;
131 rangeOptions.add("limits", "Classification[2:2]");
132
133 Stage& readerStage(makeReader(m_args->inputFile, ""));
134
135 Stage* assignStage = &readerStage;
136 if (m_args->reset)
137 assignStage = &makeFilter("filters.assign", readerStage, assignOptions);
138
139 Stage* outlierStage = assignStage;
140 if (m_args->denoise)
141 outlierStage = &makeFilter("filters.outlier", *assignStage, outlierOptions);
142
143 Stage& groundStage = makeFilter("filters.smrf", *outlierStage, groundOptions);
144
145
146 Stage* rangeStage = &groundStage;
147 if (m_args->extract)
148 rangeStage = &makeFilter("filters.range", groundStage, rangeOptions);
149
150 Stage& writer(makeWriter(m_args->outputFile, *rangeStage, ""));
151 writer.prepare(table);
152 writer.execute(table);
153
154 return 0;
155}
156
157} // namespace pdal

Callers

nothing calls this directly

Calls 3

makeFilterFunction · 0.85
addMethod · 0.45
prepareMethod · 0.45

Tested by

no test coverage detected