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

Error when decompressing laz file #43

Closed devmcp closed 2 years ago

devmcp commented 2 years ago

Downloading any .laz file from here: https://remotesensingdata.gov.scot/data#/map and attempting to extract it using e.g.

pylas.read("NT0763_2PPM_LAS_PHASE1.laz")

Results in:

     60     vlr_data = np.frombuffer(laszip_vlr.record_data, dtype=np.uint8)
     62     point_decompressed = np.zeros(point_count * point_size, np.uint8)
---> 64     lazrs.decompress_points(point_compressed, vlr_data, point_decompressed, parallel)
     65 except lazrs.LazrsError as e:
     66     raise LazError("lazrs error: {}".format(e)) from e

PanicException: assertion failed: mid <= self.len()

Any idea why this would be?

I'm on a Windows 10 machine. The file opens correctly in QGIS.

tmontaigu commented 2 years ago

You should try laspy, pylas was merged into laspy and this repo (thus the lib pylas) is no longer maintained

devmcp commented 2 years ago

Sorry. Completely missed that in the description somehow. Thanks!