gisma/uavRst

lidR tree detection not working

Ludwigm6 opened this issue · 1 comments

treepos_lidR <- function(chm =NULL,

The lidR tree_detection function changed and should now look something like this:

treepos_lidR <- function(las =NULL,
                         movingWin = 7,
                         minTreeAlt = 2) {
  
  # if (class(treepos) %in% c("RasterLayer", "RasterStack", "RasterBrick")) {
  #   chm <- raster::raster(chm)
  # }
  
  localmaxima <- lidR::tree_detection(las = las, algorithm = lmf(ws = movingWin, hmin = minTreeAlt))
  projection(localmaxima) <- chm@crs
  return(localmaxima)
}
gisma commented

@Ludwigm6 would appreciate any kind of pull request....