0

I have a text file that has XYZ and RGB values in it. To convert it to .las format i use

lfile = laspy.file.File(r"D:\las\tolas.las", mode='w',header=LasHeader(x_scale=0.01,y_scale=0.01,z_scale=0.01))
header = laspy.header.Header(point_format=2)
lfile.x = x/0.01
lfile.y = y/0.01
lfile.z = z/0.01
lfile.set_red = r
lfile.set_green = g
lfile.set_blue = b
lfile.close()

But the RGB values are not being set. Where did I go wrong. The las format is 1.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.