r-lidar / rlas

R package to read and write las and laz files used to store LiDAR data
https://cran.r-project.org/package=rlas
GNU General Public License v3.0
34 stars 14 forks source link

Can't write ScanAngleRank above 90 degrees #33

Closed Jean-Romain closed 5 years ago

Jean-Romain commented 5 years ago

See also https://github.com/Jean-Romain/lidR/issues/219. Function check_las_validity could be more tolerant with the specification and allow to write numbers up to 2⁷-1.

library(rlas)
lazfile <- system.file("extdata", "example.laz", package="rlas")
lasdata <- read.las(lazfile)
header  <- read.lasheader(lazfile)
lasdata$ScanAngleRank[1] <- 91L
f <- tempfile(fileext = ".las")
write.las(f, header, lasdata)
#> Error: Invalid data: ScanAngleRank greater than 90

@pobsteta

Jean-Romain commented 5 years ago

@pobsteta install rlas 1.3.2 from github.