Skip to content

Commit

Permalink
Fix if attribute is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Romain committed Jan 28, 2025
1 parent 665a3ba commit 9e020c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/algorithm-dec.R
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ lowest_attribute_per_voxel = function(res, attribute = "Z")

f = function(las)
{
if (!attribute %in% names(las))
stop(paste0(attribute, " is not an attribute in this point cloud"), call. = FALSE)

tmp <- NULL
voxelID = C_voxel_id(las, res)
las@data$tmp = las@data[[attribute]]
Expand Down

0 comments on commit 9e020c2

Please sign in to comment.