1

I am getting this error that I have never received before. I have tried loading data in the catalog format with multiple LiDAR files including the Megaplot.laz data built into the lidR package.

Loading the data as a LAS file works normally:

> LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
> las = lidR::readLAS(LASfile)

Then when I try to load it as a LAS catalog I am getting this error:

> ctg <- readLAScatalog(LASfile)
Error in sp::SpatialPolygons(pgeom, proj4string = crs) : 
  is(proj4string, "CRS") is not TRUE

> ctg = lidR::catalog(LASfile)
Error in sp::SpatialPolygons(pgeom, proj4string = crs) : 
  is(proj4string, "CRS") is not TRUE

What could be causing this?

0

1 Answer 1

1

Already asked here: Problem using lidR functions on Mac

See this extensive discussion on lidR bug tracker: https://github.com/Jean-Romain/lidR/issues/485#issuecomment-944397838.

The conclusion was that CRAN binaries were temporarily corrupted. A new version has been released to trigger a new build. It was supposed to be fixed according to feedbacks. If not please report a bug.

Edit: Several people reported the issue. Because it is not reproducible systematically it took time to identify the issue. I released a fix on nov 13 2021. But it seems that reinstalling R does the trick because it is not a problem from lidR

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.