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

Method processOne

filters/ReprojectionFilter.cpp:199–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197
198
199bool ReprojectionFilter::processOne(PointRef& point)
200{
201 double x(point.getFieldAs<double>(Dimension::Id::X));
202 double y(point.getFieldAs<double>(Dimension::Id::Y));
203 double z(point.getFieldAs<double>(Dimension::Id::Z));
204
205 bool ok = m_transform->transform(x, y, z);
206 if (ok)
207 {
208 point.setField(Dimension::Id::X, x);
209 point.setField(Dimension::Id::Y, y);
210 point.setField(Dimension::Id::Z, z);
211 }
212 else if (m_errorOnFailure)
213 throwError("Couldn't reproject point with X/Y/Z coordinates of (" +
214 std::to_string(point.getFieldAs<double>(Dimension::Id::X)) + ", " +
215 std::to_string(point.getFieldAs<double>(Dimension::Id::Y)) + ", " +
216 std::to_string(point.getFieldAs<double>(Dimension::Id::Z)) + ").");
217 return ok;
218}
219
220} // namespace pdal

Callers

nothing calls this directly

Calls 2

transformMethod · 0.45
setFieldMethod · 0.45

Tested by

no test coverage detected