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

Method prepare

pdal/Stage.cpp:165–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163
164
165void Stage::prepare(PointTableRef table)
166{
167 // Linearize
168 std::stack<Stage *> pending;
169 std::vector<Stage *> stages;
170
171 pending.push(this);
172 while (pending.size())
173 {
174 Stage *s = pending.top();
175 pending.pop();
176 stages.push_back(s);
177 for (Stage *in : s->m_inputs)
178 pending.push(in);
179 }
180
181 // Initialize each stage.
182 for (auto it = stages.rbegin(); it != stages.rend(); it++)
183 {
184 Stage *s = *it;
185 s->m_args.reset(new ProgramArgs);
186 s->handleOptions();
187 s->startLogging();
188 s->l_initialize(table);
189 s->initialize(table);
190 s->addDimensions(table.layout());
191 s->stopLogging();
192 }
193
194 // Call prepared() now that all stages are initialized.
195 for (auto it = stages.rbegin(); it != stages.rend(); it++)
196 {
197 Stage *s = *it;
198 s->startLogging();
199 s->l_prepared(table);
200 s->prepared(table);
201 s->stopLogging();
202 }
203}
204
205
206PointViewSet Stage::execute(PointTableRef table)

Callers 15

preparedMethod · 0.45
inspectMethod · 0.45
preparedMethod · 0.45
readLaszipMethod · 0.45
checkXYZFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
exec1Function · 0.45
exec2Function · 0.45
exec3Function · 0.45
exec4Function · 0.45
exec5Function · 0.45

Calls 12

topMethod · 0.80
handleOptionsMethod · 0.80
startLoggingMethod · 0.80
stopLoggingMethod · 0.80
pushMethod · 0.45
sizeMethod · 0.45
resetMethod · 0.45
l_initializeMethod · 0.45
initializeMethod · 0.45
addDimensionsMethod · 0.45
l_preparedMethod · 0.45
preparedMethod · 0.45

Tested by 15

TESTFunction · 0.36
TESTFunction · 0.36
exec1Function · 0.36
exec2Function · 0.36
exec3Function · 0.36
exec4Function · 0.36
exec5Function · 0.36
exec6Function · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36