Skip to content

Commit

Permalink
add provisional tree ID
Browse files Browse the repository at this point in the history
  • Loading branch information
bw4sz committed Sep 13, 2024
1 parent 0bf35be commit c558bc3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Binary file modified .DS_Store
Binary file not shown.
5 changes: 4 additions & 1 deletion R/crop_lidar_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion R/segment_trees.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

}
Expand Down
Binary file modified analysis/.DS_Store
Binary file not shown.

0 comments on commit c558bc3

Please sign in to comment.