PKS
PKS

Reputation: 71

What is the Laspy error when reading laz files?

import laspy 
import open3d as o3d
import numpy as np

las = laspy.read("file.laz")

When I use this code, I get the error: laspy.errors.LaspyException: No LazBackend selected, cannot decompress data

How can I resolve this?

Upvotes: 6

Views: 7547

Answers (2)

Samuel Gachuhi
Samuel Gachuhi

Reputation: 53

I also had the same issue and unfortunately, while working in colab, installing the laspy tool and the dependancies for .laz files using !pip install laspy[lazrs,laszip] did not help in reading the .laz file. Luckily, Qgis has the tool to convert from .las to .laz found in the Processing Toolbox > Point Cloud Conversion > Convert format. It also has the option of batch processing as well.

Upvotes: -1

felspec
felspec

Reputation: 131

The laspy website explains how to enable filehandling of .laz files.

https://laspy.readthedocs.io/en/latest/installation.html#

You have to install one of the two given .laz backends. On the top of the page are installation examples.

With unix/macOS this worked for me:

python3 -m pip install "laspy[lazrs,laszip]"

Make sure to reload your python environment after the installation.

Upvotes: 13

Related Questions