Installation

Short Instructions

Pip

# Install _without_ LAZ support
pip install laspy

# Install with LAZ support via lazrs
pip install laspy[lazrs]

# Install with LAZ support via laszip
pip install laspy[laszip]

# Install with LAZ support via both lazrs & laszip
pip install laspy[lazrs,laszip]

Conda

A conda build of laspy is available and maintained (but not by laspy)

conda install -c conda-forge laspy

lazrs is also available on conda

conda install -c conda-forge lazrs-python

However, laszip [1] is not available via conda.

Optional dependencies / features

LAZ support

laspy does not support LAZ (.laz) file by itself but can use one of two optional dependencies to support compressed LAZ files.

The 2 supported options are:

  1. lazrs [lazrs PyPi]

  2. laszip-python (bindings to laszip)

When encountering LAZ data, laspy will try to use one of the backend in the order described above. (Example: if lazrs is not installed or if it fails during, the process, laspy will try laszip)

lazrs is a Rust port of the laszip compression and decompression. Its main advantage is that it is able to compress/decompress using multiple threads which can greatly speed up things. However it does not supports points with waveforms.

laszip is the official and original LAZ implementation by Martin Isenburg. The advantage of the laszip backend is that its the official implementation, it supports points with waveform but does not offer multi-threaded compression/decompression.

Both the laszip bindings and lazrs are available on pip.

To install laspy with one of its supported backend use one of the commands show in the section above.

CRS / SRS

LAS files allows to define the CRS / SRS in which the points coordinates are. When pyproj is installed, you can use the LasHeader.add_crs() to add CRS information to a file, or you can use LasHeader.parse_crs() to get pyproj.CRS.

Cloud Optimized Point Cloud (COPC)

laspy supports COPC files via its CopcReader class. This features requires the optional dependency lazrs to be installed.

Optionaly, when python package requests is installed the CopcReader can handle COPC that are in a HTTP server.

Footnotes.

CLI

laspy has an optional command line interface (CLI) with the following commands:

  • laspy info to print informations about a LAS/LAZ file

  • laspy compress / laspy decompress to compress/decompress one or many file

  • laspy convert to convert file(s) between version and point format

  • laspy copc query to download to a LAS/LAZ file some points from a COPC ressource.

As the cli requires etra dependencies, it has to be installed using pip install laspy[cli].