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

Method dumpDetail

kernels/DeltaKernel.cpp:189–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187
188
189MetadataNode DeltaKernel::dumpDetail(PointViewPtr& srcView,
190 PointViewPtr& candView, KD3Index& index, DimIndexMap& dims)
191{
192 MetadataNode root;
193
194 for (PointId id = 0; id < srcView->size(); ++id)
195 {
196 PointRef point = srcView->point(id);
197 PointId candId = index.neighbor(point);
198
199 MetadataNode delta = root.add("delta");
200 delta.add("i", id);
201 for (auto di = dims.begin(); di != dims.end(); ++di)
202 {
203 DimIndex& d = di->second;
204 double sv = srcView->getFieldAs<double>(d.m_srcId, id);
205 double cv = candView->getFieldAs<double>(d.m_candId, candId);
206
207 delta.add(d.m_name, sv - cv);
208 }
209 }
210 return root;
211}
212
213} // pdal

Callers

nothing calls this directly

Calls 6

pointMethod · 0.80
neighborMethod · 0.80
sizeMethod · 0.45
addMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected