I have data from Lidar in .xyz format.
I read that it could be beneficial to convert it to .las. So that one can use e.g. laspy -library.
For example (code copied from an example):
import laspy
import numpy as np
hdr = laspy.header.Header()
outfile = laspy.file.File("output.las", mode="w", header=hdr)
allx = np.array([1.000, 2.000, 3.000, 3.000]) # Four Points
ally = np.array([0.000, 0.000, 0.000, 3.000])
allz = np.array([10.000, 10.000, 11.000, 11.000])
xmin = np.floor(np.min(allx))
ymin = np.floor(np.min(ally))
zmin = np.floor(np.min(allz))
outfile.header.offset = [xmin,ymin,zmin] # how to know what this should be?
outfile.header.scale = [0.001,0.001,0.001] # how to know what this should be?
outfile.x = allx
outfile.y = ally
outfile.z = allz
outfile.close()
However, I don't have access to any "header data" or metadata.
How can I know what to specify offset
and scale
as?