daavoo / pyntcloud

pyntcloud is a Python library for working with 3D point clouds.
http://pyntcloud.readthedocs.io
MIT License
1.39k stars 221 forks source link

can not get las file header vlrs information #273

Open darkclip opened 4 years ago

darkclip commented 4 years ago

In las file format, vlrs info is crucial to correctly describe point's spatial location. However, if you try to use pyntcloud.las_header.vlrs, you wouldn't get anything, the value is alway none.

Through your source code, I can see you try to use data["las_header"] = las.header But it can not pass vlrs or evlrs info into new object, because in laspy, vlrs info is dynamically obtained afterwards vlrs = property(get_vlrs, set_vlrs, None, doc) def get_vlrs(self): return(self.reader.get_vlrs())

A simple fix would be add something like data["las_vlrs"] = las.header.vlrs data["las_evlrs"] = las.header.evlrs

Please fix this issue, otherwise, las file support is equal to none existence.

daavoo commented 4 years ago

Hola @darkclip , thanks for the detailed bug report.

If you find time to implement the fix you propose the Pull Request would be more than wellcome. If not I will try to find some time to fix it