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
601 stars 131 forks source link

lidR::projection no longer extends raster::projection #525

Closed Jean-Romain closed 2 years ago

Jean-Romain commented 2 years ago

lidR::projection no longer extends raster::projection which introduces backward incompatibilities when raster is laoded after lidR

library(lidR)
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
ctg = readLAScatalog(LASfile)
projection(ctg)
#> [1] "+proj=utm +zone=17 +datum=NAD83 +units=m +no_defs"

library(raster)
#> Le chargement a nécessité le package : sp
#> 
#> Attachement du package : 'raster'
#> Les objets suivants sont masqués depuis 'package:lidR':
#> 
#>     projection, projection<-
projection(ctg)
#> [1] NA

Created on 2022-02-03 by the reprex package (v2.0.1)