diff --git a/NEWS.md b/NEWS.md index f4ef307d..1687ca69 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,8 +3,9 @@ If you are viewing this file on CRAN, please check [the latest news on GitHub](h ## lidR v4.0.4 (Release date: ----------) - Fix: interpolation of NA pixels failed when a single pixel is missing [#684](https://github.com/r-lidar/lidR/issues/684) -- Fix: [#694](https://github.com/r-lidar/lidR/issues/594). `silva2016` can load (not too big) ondisk chm on the fly. -- Fix: [#690](https://github.com/r-lidar/lidR/issues/690). `rasterize_terrain()` works in parallel with `res = `. +- Fix: [#694](https://github.com/r-lidar/lidR/issues/594) `silva2016` can load (not too big) ondisk chm on the fly. +- Fix: [#690](https://github.com/r-lidar/lidR/issues/690) `rasterize_terrain()` works in parallel with `res = `. +- Fix: [#689](https://github.com/r-lidar/lidR/issues/689) attributes are not renamed when filtering a point cloud. ## lidR v4.0.3 (Release date: 2023-03-09) diff --git a/R/methods-LAS.R b/R/methods-LAS.R index 3bc510a8..f5e6cc43 100644 --- a/R/methods-LAS.R +++ b/R/methods-LAS.R @@ -362,7 +362,7 @@ smart_subset <- function(las, i) attr <- attr[!attr %in% c("X", "Y", "Z")] for (name in attr) new_data[[name]] <- data[[name]][i] - new_las <- LAS(new_data, las@header, st_crs(las), FALSE, las@index) + new_las <- LAS(new_data, las@header, st_crs(las), FALSE, las@index, no_attr_name_check = TRUE) new_las <- las_update(new_las) return(new_las) }