This is separated from processOne so that we're sure when processOne is called we know we're in stream mode.
| 805 | // This is separated from processOne so that we're sure when processOne is |
| 806 | // called we know we're in stream mode. |
| 807 | bool LasWriter::processPoint(PointRef& point) |
| 808 | { |
| 809 | if (d->opts.compression == las::Compression::True) |
| 810 | { |
| 811 | LeInserter ostream(m_pointBuf.data(), m_pointBuf.size()); |
| 812 | if (!fillPointBuf(point, ostream)) |
| 813 | return false; |
| 814 | writeLazPerfBuf(m_pointBuf.data(), d->header.pointSize, 1); |
| 815 | } |
| 816 | else |
| 817 | { |
| 818 | LeInserter ostream(m_pointBuf.data(), d->header.pointSize); |
| 819 | if (!fillPointBuf(point, ostream)) |
| 820 | return false; |
| 821 | m_ostream->write(m_pointBuf.data(), d->header.pointSize); |
| 822 | } |
| 823 | return true; |
| 824 | } |
| 825 | |
| 826 | |
| 827 | void LasWriter::prerunFile(const PointViewSet& pvSet) |