readLAS fails to load datasets that contain non-integer values for default spectral attributes. Returns the following error message:
Error: Invalid data: (Attribute name) is not an integer
Example:
library(lidR)
las <- LAS(data = data.frame(
X = runif(100, 1, 10),
Y = runif(100, 1, 10),
Z = runif(100, 1, 10)
))
nir = runif(100)
las <- add_lasattribute(las, x = nir, name = 'nir', desc = 'nir')
f = tempfile(fileext = ".las")
writeLAS(las, f)
readLAS(f)
#> Attribute 'nir' renamed 'NIR' to match with default attribute names.
#> Erreur : Invalid data: NIR is not an integer
readLAS fails to load datasets that contain non-integer values for default spectral attributes. Returns the following error message:
Example:
Discussed in https://github.com/r-lidar/lidR/discussions/658