r-lidar / lidR

Airborne LiDAR data manipulation and visualisation for forestry application
https://CRAN.R-project.org/package=lidR
GNU General Public License v3.0
582 stars 130 forks source link

readLAS or Readcatalog don't work with v.4.0.5 #734

Closed pobsteta closed 9 months ago

pobsteta commented 9 months ago

Hi, This code work with v.4.0.4 but not with 4.0.5 ? crash R 4.3.2 !!


librarian::shelf("r-lidar/lidR", "Jean-Romain/ALSroads", lidR, sf, raster, RCurl, rlas)
bdown=function(url, file){
  f = CFILE(file, mode="wb")
  a = curlPerform(url = url, writedata = f@ref, noprogress=FALSE)
  close(f)
  return(a)
}

file <- "LHD_FXX_1042_6875_PTS_C_LAMB93_IGN69.copc.laz"
url <- "https://storage.sbg.cloud.ovh.net/v1/AUTH_63234f509d6048bca3c9fd7928720ca1/ppk-lidar/SE/LHD_FXX_1042_6875_PTS_C_LAMB93_IGN69.copc.laz"
ret <- bdown(url, file)
las <- readLAS(file)
plot(las)
ctg <-  readLAScatalog(file)
plot(ctg)`
@+
Jean-Romain commented 9 months ago

Please make a reproducible example with basic packages. I don't know what are librarian bdown and what is inside this function, but I'm pretty sure it is not useful to reproduce.

Jean-Romain commented 9 months ago

Mmmm I guess it is an issue with COPC file. Please also report your version of rlas

pobsteta commented 9 months ago

librarian install just the package if not installed. You are right i think 👍

lasdata <- read.las(file) ## ok
lasheader <- read.lasheader(file) ## crash R 4.3.2