daavoo / pyntcloud

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

Add bool dtype support for PLY files #321

Closed Nicholas-Autio-Mitchell closed 2 years ago

Nicholas-Autio-Mitchell commented 2 years ago

This PR addresses https://github.com/daavoo/pyntcloud/issues/309 and adds support for the file reader to deal with Boolean fields (writing boolean fields was already not an issue). It also adds a new test fixture file and a simple unit test.

The new test data PLY file contains the following header:

diamond with bool points dtypes

which loads to give the following dataframe - notice the newly inserted is_green column of type bool:

green blue nx ny nz is green
Nicholas-Autio-Mitchell commented 2 years ago

@daavoo - I've added a test that writes a PLY file containing Boolean data

https://github.com/daavoo/pyntcloud/pull/321/files#diff-021377fee185787af295603466e9f1f3fec039246017a515213eb7c2f2115888