diff --git a/.DS_Store b/.DS_Store index b626c58..748e2d7 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/R/crop_lidar_plots.R b/R/crop_lidar_plots.R index fe2486e..08cb752 100644 --- a/R/crop_lidar_plots.R +++ b/R/crop_lidar_plots.R @@ -77,7 +77,10 @@ crop_lidar_plots<-function(site_name="TEAK",year="2018"){ #if null, return NA if(nrow(clipped_las@data)==0){ next - } + } + + # add predicted treeid from segment_trees + clipped_las<-lidR::segment_trees(las, lidR::li2012(dt1 = 1,dt2=2,hmin=2,speed_up = 10)) lidR::writeLAS(clipped_las,cname) print(cname) diff --git a/R/segment_trees.R b/R/segment_trees.R index ec57620..de00669 100644 --- a/R/segment_trees.R +++ b/R/segment_trees.R @@ -59,7 +59,7 @@ segment_trees<-function(las,algorithm="watershed",chm=chm,plots=F, max_cr_factor tree = lidR::filter_poi(crowns, !is.na(treeID)) if(plots){ - plot(tree, color = "treeID", colorPalette = pastel.colors(100), size = 1) + plot(tree, color = "treeID", pal = pastel.colors(100), size = 1) } } diff --git a/analysis/.DS_Store b/analysis/.DS_Store index d08d585..1fcdd89 100644 Binary files a/analysis/.DS_Store and b/analysis/.DS_Store differ