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

Method prepared

filters/SMRFilter.cpp:135–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void SMRFilter::prepared(PointTableRef table)
136{
137 const PointLayoutPtr layout(table.layout());
138
139 if ((m_groundClass == m_otherClass) && !m_onlyGround)
140 {
141 throwError("Ground and non-ground class cannot be"
142 "equal when only_ground is false.");
143 }
144
145 for (auto& r : m_args->m_ignored)
146 {
147 r.m_id = layout->findDim(r.m_name);
148 if (r.m_id == Id::Unknown)
149 throwError("Invalid dimension name in 'ignored' option: '" +
150 r.m_name + "'.");
151 }
152 if (m_args->m_returns.size())
153 {
154 for (auto& r : m_args->m_returns)
155 {
156 Utils::trim(r);
157 if ((r != "first") && (r != "intermediate") && (r != "last") &&
158 (r != "only"))
159 {
160 throwError("Unrecognized 'returns' value: '" + r + "'.");
161 }
162 }
163
164 if (!layout->hasDim(Id::ReturnNumber) ||
165 !layout->hasDim(Id::NumberOfReturns))
166 {
167 log()->get(LogLevel::Warning) << "Could not find ReturnNumber and "
168 "NumberOfReturns. Skipping "
169 "segmentation of last returns and "
170 "proceeding with all returns.\n";
171 m_args->m_returns.clear();
172 }
173 }
174 if (!m_args->m_windowArg->set())
175 m_args->m_window = 18 * m_args->m_cell;
176}
177
178void SMRFilter::ready(PointTableRef table)
179{

Callers

nothing calls this directly

Calls 8

trimFunction · 0.85
hasDimMethod · 0.80
logFunction · 0.50
findDimMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45
clearMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected