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

Method processOne

filters/AssignFilter.cpp:172–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170
171
172bool AssignFilter::processOne(PointRef& point)
173{
174 if (m_args->m_condition.m_id != Dimension::Id::Unknown)
175 {
176 double condVal = point.getFieldAs<double>(m_args->m_condition.m_id);
177 if (!m_args->m_condition.valuePasses(condVal))
178 return true;
179 }
180 for (AssignRange& r : m_args->m_assignments)
181 if (r.valuePasses(point.getFieldAs<double>(r.m_id)))
182 point.setField(r.m_id, r.m_value);
183 for (expr::AssignStatement& expr : m_args->m_statements)
184 if (expr.conditionalExpr().eval(point))
185 point.setField(expr.identExpr().eval(), expr.valueExpr().eval(point));
186
187 return true;
188}
189
190
191void AssignFilter::filter(PointView& view)

Callers

nothing calls this directly

Calls 3

valuePassesMethod · 0.80
setFieldMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected