Oslandia / py3dtiles

:warning: Project migrated to : https://gitlab.com/py3dtiles/py3dtiles :warning:
https://py3dtiles.org
Other
215 stars 76 forks source link

Support RGB information when converting .xyz files #53

Closed delhomer closed 5 years ago

delhomer commented 5 years ago

When converting a .xyz file that contains 6 columns (x, y, z and r, g, b), one expects to build a colored 3dtile. However one gets the following trace:

Traceback (most recent call last):
  File "/home/rde/src/py3dtiles/py3dtiles/command_line.py", line 38, in main
    convert.main(args)
  File "/home/rde/src/py3dtiles/py3dtiles/convert.py", line 313, in main
    infos = fn(args)
  File "/home/rde/src/py3dtiles/py3dtiles/points/task/xyz_reader.py", line 38, in init
    points[i] = [float(s) for s in line.split(" ")]
ValueError: cannot copy sequence with size 6 to array axis with dimension 3

I read the xyz_reader.py script, and it seems that the color is filled with white triplets.

Considering the RGB info looks possible in init function (there is a RGB argument), however it is not straightforward in run function...