Search in sources :

Example 1 with ArithmeticDecoder

use of com.revolsys.elevation.cloud.las.zip.ArithmeticDecoder in project com.revolsys.open by revolsys.

the class LasPointCloud method forEachPointLaz.

private void forEachPointLaz(final Consumer<? super LasPoint> action) {
    try (ArithmeticDecoder decoder = new ArithmeticDecoder(this.reader);
        BaseCloseable closable = this) {
        final LasZipHeader lasZipHeader = getLasZipHeader();
        final LazDecompress[] pointDecompressors = newLazDecompressors(lasZipHeader, decoder);
        if (lasZipHeader.isCompressor(LasZipHeader.LASZIP_COMPRESSOR_POINTWISE)) {
            forEachPointLazPointwise(decoder, pointDecompressors, action);
        } else {
            forEachPointLazChunked(decoder, pointDecompressors, action);
        }
    }
}
Also used : BaseCloseable(com.revolsys.io.BaseCloseable) LazDecompress(com.revolsys.elevation.cloud.las.zip.LazDecompress) ArithmeticDecoder(com.revolsys.elevation.cloud.las.zip.ArithmeticDecoder)

Aggregations

ArithmeticDecoder (com.revolsys.elevation.cloud.las.zip.ArithmeticDecoder)1 LazDecompress (com.revolsys.elevation.cloud.las.zip.LazDecompress)1 BaseCloseable (com.revolsys.io.BaseCloseable)1