Closed SuaveFool closed 3 years ago
Yes that is expected, lazrs > 0.2 intruduced new features and changed the API which pylas 0.4.3 does not support.
To ensure you have a compatible lazrs version you have to install pylas by doing
pip install pylas[lazrs]
Excellent, that works, sorry, I'd tried using pip install pylas[laszip]
previously and it hadn't worked, because that's for the current master not 0.4.x, so I assumed it wouldn't work for lazrs as well.
This is a great library! It seems to be the only workable python library for parsing ASPRS LAS 1.4 files. PDAL is way to easy to break with perfectly valid LAS files.
compress_points_buf
is a bytes object when using lazrs causing errors with thecompress_points_buf.tobytes()
call. https://github.com/tmontaigu/pylas/blob/7b35d43c8a3463d42fb560c60a82eeba16fc1808/pylas/lasdatas/base.py#L283Using lazrs 0.2.5, pylas 0.4.3, Python 3.8.5
Other notes in case relevant:
.tobytes()
or replace withpoints_bytes = bytearray(compressed_points_buf if isinstance(compressed_points_buf, bytes) else compressed_points_buf.tobytes())
.