How to use the lazrs.decompress_points function in lazrs

To help you get started, we’ve selected a few lazrs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tmontaigu / pylas / pylas / compression.py View on Github external
def lazrs_decompress_buffer(compressed_buffer, point_size, point_count, laszip_vlr, parallel=True):
    try:
        import lazrs
    except Exception as e:
        raise LazError("lazrs is not installed") from e

    try:
        point_compressed = np.frombuffer(compressed_buffer, dtype=np.uint8)
        vlr_data = np.frombuffer(laszip_vlr.record_data, dtype=np.uint8)

        point_decompressed = np.zeros(point_count * point_size, np.uint8)

        lazrs.decompress_points(point_compressed, vlr_data, point_decompressed, parallel)
    except lazrs.LazrsError as e:
        raise LazError("lazrs error: {}".format(e)) from e
    else:
        return point_decompressed

lazrs

Python bindings for laz-rs

Apache-2.0
Latest version published 1 month ago

Package Health Score

87 / 100
Full package analysis

Similar packages