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

Method readPgPatch

plugins/pgpointcloud/io/PgReader.cpp:280–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278
279
280point_count_t PgReader::readPgPatch(PointViewPtr view, point_count_t numPts)
281{
282 point_count_t numRemaining = m_patch.remaining;
283 PointId nextId = view->size();
284 point_count_t numRead = 0;
285 PointRef point(*view, nextId);
286 size_t offset = (m_patch.count - m_patch.remaining) * packedPointSize();
287 char *pos = (char *)(m_patch.binary.data() + offset);
288
289 while (numRead < numPts && numRemaining > 0)
290 {
291 point.setPointId(nextId);
292 writePoint(point, pos);
293 pos += packedPointSize();
294 numRemaining--;
295 nextId++;
296 numRead++;
297 }
298 m_patch.remaining = numRemaining;
299 return numRead;
300}
301
302bool PgReader::readPgPatch(PointRef& point)
303{

Callers

nothing calls this directly

Calls 4

setPointIdMethod · 0.80
packedPointSizeFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected