cBLUE-dev-team / cBLUE.github.io

cBLUE is a tool to calculate the total propagated uncertainty of bathymetric lidar data.
https://noaa-rsd.github.io/cBLUE.github.io/
GNU Lesser General Public License v2.1
12 stars 1 forks source link

Update csv output #63

Closed kiefk closed 1 year ago

kiefk commented 1 year ago

The csv option printed the X, Y, and Z point record from the las file to the csv file instead of the actual X, Y, and Z coordinate.

Using the ASPRS LAS Specification:

to compute a given X coordinate from the point record, the point record X is multiplied by the X scale factor and then added to the X offset.

𝑋𝑐𝑜𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒 = (𝑋𝑟𝑒𝑐𝑜𝑟𝑑 𝑋𝑠𝑐𝑎𝑙𝑒) + 𝑋𝑜𝑓𝑓𝑠𝑒𝑡 (1) 𝑌𝑐𝑜𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒 = (𝑌𝑟𝑒𝑐𝑜𝑟𝑑 𝑌𝑠𝑐𝑎𝑙𝑒) + 𝑌𝑜𝑓𝑓𝑠𝑒𝑡 (2) 𝑍𝑐𝑜𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒 = (𝑍𝑟𝑒𝑐𝑜𝑟𝑑 * 𝑍𝑠𝑐𝑎𝑙𝑒) + 𝑍𝑜𝑓𝑓𝑠𝑒𝑡 (3)

Las.py has been modified to move the XYZ coordinate conversion to it's own function: xyz_to_coordinate().

xyz_to_coordinate() is used in Tpu.py to convert the point record to coordinates, and print the coordinate values to the csv file.