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

Method execute

pdal/Streamable.cpp:73–189  ·  view source on GitHub ↗

Streamed execution.

Source from the content-addressed store, hash-verified

71
72// Streamed execution.
73void Streamable::execute(StreamPointTable& table)
74{
75 m_log->get(LogLevel::Debug) << "Executing pipeline in stream mode." <<
76 std::endl;
77 struct StreamableList : public std::list<Streamable *>
78 {
79 StreamableList operator - (const StreamableList& other) const
80 {
81 StreamableList resultList;
82 auto ti = rbegin();
83 auto oi = other.rbegin();
84
85 while (oi != other.rend() && ti != rend() && *ti == *oi)
86 {
87 oi++;
88 ti++;
89 }
90 while (ti != rend())
91 resultList.push_front(*ti++);
92 return resultList;
93 };
94
95 void ready(PointTableRef& table)
96 {
97 for (auto s : *this)
98 {
99 s->startLogging();
100 s->ready(table);
101 s->stopLogging();
102 SpatialReference srs = s->getSpatialReference();
103 if (!srs.empty())
104 table.setSpatialReference(srs);
105 }
106 }
107
108 void done(PointTableRef& table)
109 {
110 for (auto s : *this)
111 {
112 s->startLogging();
113 s->done(table);
114 s->stopLogging();
115 }
116 }
117 };
118
119 const Stage *nonstreaming = findNonstreamable();
120 if (nonstreaming)
121 nonstreaming->throwError("Attempting to use stream mode with a "
122 "stage that doesn't support streaming.");
123
124 SpatialReference srs;
125 std::list<StreamableList> lists;
126 StreamableList stages;
127 StreamableList lastRunStages;
128
129 if (!table.layout()->finalized())
130 {

Callers

nothing calls this directly

Calls 15

findNonstreamableFunction · 0.85
executeFunction · 0.85
copyFunction · 0.85
throwErrorMethod · 0.80
startLoggingMethod · 0.80
setPointIdMethod · 0.80
stopLoggingMethod · 0.80
getSpatialReferenceMethod · 0.80
logFunction · 0.70
nameFunction · 0.70
getMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected