# NOT RUN {
# }
# NOT RUN {
# required packages
require(uavRst)
require(mapview)
# get the rgb image, chm and training data
utils::download.file("https://github.com/gisma/gismaData/raw/master/uavRst/data/tutorial_data.zip",
paste0(tempdir(),"tutorial_data.zip"))
unzip(zipfile = paste0(tempdir(),"tutorial_data.zip"), exdir = tempdir())
crown<-raster::shapefile(paste0(tempdir(),"rgb_3-3_train2.shp"))
## calculate polygon morpho metrics
polymetric <- poly_metrics(crown)
# visualize it
mapview::mapview(polymetric)
##+
# }
Run the code above in your browser using DataLab