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

Seekable reader #38

Closed thijsvanwinden closed 3 years ago

thijsvanwinden commented 3 years ago

Hi,

First of all, I want to compliment you on this python implementation for reading LiDAR data. I think the on the fly decompression in Python is great.

I was wondering if there was a possibility for adding a seek function to the LasReader. This would greatly improve the usability for indexed reading, especially for large compressed LAZ datasets containing a lasindex.

I saw in the rust package that the LasZipDecompressor actually supports seeking. https://github.com/tmontaigu/laz-rs-python/blob/master/src/lib.rs#L187. I think the same holds for your laszip python bindings.

I was actually kind of surprised that this option was missing and wondering before doing the implementation whether there is a limitation I'm overlooking?

Thijs van Winden

PS: I have a use case where I have to query nearby LiDAR points from a huge dataset, so streaming access would be really useful there.

tmontaigu commented 3 years ago

Hello and Thank you

I think a seek method is totally doable and should be fairly easy to do since, as you mentionned its already implemented in laz-rs and the fact that its missing is just an overlook.

laszip-python bindinsgs do not have a seek method, but I think this is something that can also be implemented.

tmontaigu commented 3 years ago

This feature is available in laspy 2.0 which supersed pylas