Commit 7a06221b authored by Monnet Jean-Matthieu's avatar Monnet Jean-Matthieu
Browse files

use of add_attribute in tree detection

No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -302,7 +302,7 @@ Before computation of point cloud metrics in each segment, the whole point cloud
# normalize point cloud
lasn <- lidR::normalize_height(laschablais3, lidR::tin())
# add segment id in LAS object
lasn@data$seg.id <- raster::extract(segms[["segments.id"]], lasn@data[,1:2])
lasn <- lidR::add_attribute(lasn, raster::extract(segms[["segments.id"]], lasn@data[,1:2]), "seg.id")
# split las object by segment id
lasl <- split(lasn@data,lasn@data$seg.id)
# convert list of data.frames to list of las objects
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment