I'm using the approach described here to change LiDAR point cloud projection in R: Can I re-project an LAS file in LidR But, what about lidR catalog reprojection?
If I used the same reproducible dataset than in the post Can I re-project an LAS file in LidR:
library(lidR)
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
# las approach
las = readLAS(LASfile)
las
las2 = spTransform(las, sp::CRS(SRS_string = "EPSG:26918"))
class(las2)
# [1] "LAS"
# attr(,"package")
# [1] "lidR"
# lascatalog approach
ctg <- catalog(LASfile)
ctg2 <- spTransform(ctg, sp::CRS(SRS_string = "EPSG:26918"))
class(ctg2)
# [1] "SpatialPolygonsDataFrame"
# attr(,"package")
# [1] "sp"
The result when using the same command with a lascatalog is a SpatialPolygonsDataFrame and not a lascatalog... Is there a way to reproject lascatalog while remaining in R?
I don't like the las2las solution because you may only work with projection already in pre encoded by Martin within the tool (or maybe I'm missing something with the use or las2las)