Description Usage Arguments Value Author(s) Examples
Find potential tree positions using a canopy height model by using an iterative watershed algorithm. Basically returns a vector data sets with the tree crown geometries and a bunch of corresponding indices.
1 2 3 4 5 6 7 8 9 10 11 12 | treepos_GWS(
chm = NULL,
minTreeAlt = 10,
minTreeAltParam = "chmQ20",
minCrownArea = 3,
maxCrownArea = 150,
join = 1,
thresh = 0.1,
split = TRUE,
cores = parallel::detectCores(),
giLinks = NULL
)
|
chm |
raster* canopy height model |
minTreeAlt |
numeric. minimum height of trees to be integrated in the analysis |
minTreeAltParam |
character. code for the percentile that is used as tree height treshold. It is build using the key letters |
minCrownArea |
numeric. minimum area in square meter (if you use projected data) of the projected tree crowns |
maxCrownArea |
numeric. maximum area in square meter (if you use projected data) of the projected tree crowns |
join |
numeric. Join Segments based on Threshold Value, 0=no join, 1=treepos_GWS2saddle diff, 2=treepos_GWS2treepos diff. see also SAGA GIS Help |
thresh |
numeric. Specify a threshold value as minimum difference between neighboured segments in meter. see also SAGA GIS Help |
split |
split polygons default is TRUE |
cores |
number of cores to be used |
giLinks |
list. of GI tools cli paths |
raster* object
return raster* object
Chris Reudenbach
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## Not run:
# required packages
require(uavRst)
require(link2GI)
# create and check the links to the GI software
giLinks<-uavRst::linkGI()
if (giLinks$saga$exist & giLinks$otb$exist & giLinks$grass$exist) {
# project folder
projRootDir<-tempdir()
# create subfolders please mind that the pathes are exported as global variables
paths<-link2GI::initProj(projRootDir = projRootDir,
projFolders = c("data/","data/ref/","output/","run/","las/"),
global = TRUE,
path_prefix = "path_")
data(chm_seg)
# calculate treepos using uavRst generic approach
tPos <- uavRst::treepos_GWS(chm = chm_seg[[1]],
minTreeAlt = 2,
maxCrownArea = 150,
join = 1,
thresh = 0.35,
split=TRUE,
cores=1,
giLinks = giLinks )
}
##+
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.