tmontaigu / pylas

⚠️ pylas was merged into laspy 2.0 https://github.com/laspy/laspy⚠️
BSD 3-Clause "New" or "Revised" License
39 stars 13 forks source link

"lasrs" compression not working with current release in PyPi 0.4.3 #35

Closed SuaveFool closed 3 years ago

SuaveFool commented 3 years ago

compress_points_buf is a bytes object when using lazrs causing errors with the compress_points_buf.tobytes() call. https://github.com/tmontaigu/pylas/blob/7b35d43c8a3463d42fb560c60a82eeba16fc1808/pylas/lasdatas/base.py#L283

Using lazrs 0.2.5, pylas 0.4.3, Python 3.8.5

Other notes in case relevant:

tmontaigu commented 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]
SuaveFool commented 3 years ago

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.