| 831 | |
| 832 | |
| 833 | void 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 | |
| 860 | void LasWriter::writeLazPerfBuf(char *pos, size_t pointLen, point_count_t numPts) |
nothing calls this directly
no test coverage detected