Error reading data with spectral reflectance attributes #658
-
Hi everyone, I've run into a hurdle with which I would really appreciate some help. I have a collection of las files generated from structure from motion which have additional spectral attributes recorded as decimal reflectance values, rather than 8 bit integers. These loaded fine in the old version of lidR but we have been unable to open them since the major updates a bit ago. As luck would have it, most colors had been added as full names (e.g., red instead of R) so lidR does not flag them as a default attribute. However, our near infrared data is stored as nir. Consequently, we get the following error when attempting to load a file: Attribute 'nir' renamed 'NIR' to match with default attribute names. Is there a way around this within readLAS? Alternatively, is there a way to modify the attribute name (e.g., change it to nir_reflectance) so lidR will not flag it? Thank you greatly for any help. Sean |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Please report an issue with a minimal reproducible example. Is is related to r-lidar/rlas#59 ?
Sure, use library(lidR)
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las = readLAS(LASfile)
n = names(las@data)
n[4] = "time"
names(las@data) = n
names(las) You can tweak everything manually to reach your goal but I need a reproducible example to help |
Beta Was this translation helpful? Give feedback.
Please report an issue with a minimal reproducible example. Is is related to r-lidar/rlas#59 ?
Sure, use
names()
You can tweak everything manually to reach your goal but I need a reproducible example to help