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

Method writeView

io/LasWriter.cpp:833–857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

831
832
833void LasWriter::writeView(const PointViewPtr view)
834{
835 Utils::writeProgress(m_progressFd, "READYVIEW", std::to_string(view->size()));
836
837 point_count_t pointLen = d->header.pointSize;
838
839 // Make a buffer of at most a meg.
840 m_pointBuf.resize((std::min)((point_count_t)1000000, pointLen * view->size()));
841
842 const PointView& viewRef(*view.get());
843 point_count_t remaining = view->size();
844 PointId idx = 0;
845 while (remaining)
846 {
847 point_count_t filled = fillWriteBuf(viewRef, idx, m_pointBuf);
848 idx += filled;
849 remaining -= filled;
850
851 if (d->opts.compression == las::Compression::True)
852 writeLazPerfBuf(m_pointBuf.data(), pointLen, filled);
853 else
854 m_ostream->write(m_pointBuf.data(), filled * pointLen);
855 }
856 Utils::writeProgress(m_progressFd, "DONEVIEW", std::to_string(view->size()));
857}
858
859
860void LasWriter::writeLazPerfBuf(char *pos, size_t pointLen, point_count_t numPts)

Callers

nothing calls this directly

Calls 5

writeProgressFunction · 0.85
resizeMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected