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

Method writeField

pdal/DbReader.cpp:105–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103
104
105void DbReader::writeField(PointRef& point, const char *pos, const DimType &dim)
106{
107 using namespace Dimension;
108
109 if (dim.m_id == Id::X || dim.m_id == Id::Y || dim.m_id == Id::Z)
110 {
111 Everything e;
112
113 memcpy(&e, pos, Dimension::size(dim.m_type));
114 double d = Utils::toDouble(e, dim.m_type);
115 d = (d * dim.m_xform.m_scale.m_val) + dim.m_xform.m_offset.m_val;
116 point.setField(dim.m_id, d);
117 }
118 else
119 point.setField(dim.m_id, dim.m_type, pos);
120}
121
122
123/// Write a point's packed data into a buffer.

Callers

nothing calls this directly

Calls 3

toDoubleFunction · 0.85
sizeFunction · 0.70
setFieldMethod · 0.45

Tested by

no test coverage detected