Commit ddb5729d authored by Monnet Jean-Matthieu's avatar Monnet Jean-Matthieu
Browse files

renamed habitat -> forest structure Rmd

parent f42ce606
---
title: "Workflow for habitat metrics computation from ALS data"
title: "R workflow for forest structure metrics computation from ALS data"
author: "Jean-Matthieu Monnet, with contributions from B. Reineking and A. Glad"
date: "Jan 26, 2021"
date: "`r Sys.Date()`"
output:
pdf_document: default
html_document: default
bibliography: workflow.treedetection.bib
pdf_document: default
papersize: a4
bibliography: "./bib/bibliography.bib"
---
```{r setup, include=FALSE}
library(knitr)
knitr::opts_chunk$set(echo = TRUE)
# Set so that long lines in R will be wrapped:
knitr::opts_chunk$set(tidy.opts=list(width.cutoff=80),tidy=TRUE)
knitr::opts_chunk$set(fig.align = "center")
knitr::opts_chunk$set(fig.align = "center")
```
---
Licence: CC-BY
Source page: https://gitlab.irstea.fr/jean-matthieu.monnet/lidaRtRee/wikis/Forest-habitat-metrics
Changelog:
* Jan 2021: updated to comply with lidR 3.1.0 and lidaRtRee 3.0.0
+ Oct, 2020: checked compatibility with lidR 3.0.3
+ May, 2020: added edge metrics, gaps computed using option `gapReconstruct=TRUE`, output resolution changed to 10 m for better consistency of tree metrics
+ July, 2019: use of `doFuture` package instead of `doParallel` for parallelization; tested with lidR 2.1.0
+ Feb, 2019: updated for compatibility with package lidR 2.0.0 and lidaRtRee 2.0.0
+ July, 2018: initial version
Licence: CC-BY / Source page
The code below presents a metrics computation workflow from Airborne Laser Scanning (ALS) data. Workflow is based on functions from packages `lidaRtRee` and `lidR`, packages `vegan` and `foreach` are also required. Metrics are computed for each cell of a grid defined by a resolution. Those metrics are designed to describe the 3D structure of forest habitats.
The R code below presents a forest structure metrics computation workflow from Airborne Laser Scanning (ALS) data. Workflow is based on functions from packages `lidaRtRee` and `lidR`, packages `vegan` and `foreach` are also required. Metrics are computed for each cell of a grid defined by a resolution. Those metrics are designed to describe the 3D structure of forest.
Different types of metrics are computed:
* 1D height metrics
+ 2D metrics of the canopy height model (CHM)
+ tree segmentation metrics
+ gap metrics
+ forest gaps and edges metrics
The forest structure metrics derived from airborne laser scanning can be used for habitat suitability modelling and mapping. This workflow has been applied to compute the metrics used in the modeling and mapping of the habitat of Capercaillie (*Tetrao urogallus*)(@Glad20). For more information about tree segmentation and gaps detection, please refer to the corresponding tutorials.
The workflow processes normalized point clouds provided as las/laz tiles of rectangular extent. Parallelization is used for faster processing, packages `foreach`, `future` and `doFuture` are used. A buffer is loaded around each tile to prevent border effects in tree segmentation and CHM processing.
The workflow processes normalized point clouds provided as las/laz tiles of rectangular extent. Parallelization is used for faster processing, packages `foreach`, `future` and `doFuture` are used. A buffer is loaded around each tile to prevent edge effects in tree segmentation and CHM processing.
## Parameters
......@@ -47,7 +40,6 @@ library(foreach)
# create parallel frontend, specify to use two parallel sessions
doFuture::registerDoFuture()
future::plan("multisession", workers = 2L)
#
```
Numerous parameters have to be set for processing.
......@@ -86,9 +78,9 @@ n.breaksH <- gsub("-","",paste("H.nb", breaksH[c(-length(breaksH))],"_", breaksH
```
The first step is to create a catalog of LAS files (should be normalized, non-overlapping rectangular tiles). Preferably, tiles should be aligned on a multiple of resolution, and points should not lie on the northern or eastern border when such borders are common with adjacent tiles.
```{r lascatalog, include = TRUE, fig.dim = c(3.5, 2.5), out.width='40%', message=FALSE}
```{r lascatalog, include = TRUE, fig.dim = c(3.5, 2.5), out.width='40%', warning=FALSE}
# create catalog of LAS files
cata <- lidR::catalog("./data.habitat.metrics")
cata <- lidR::catalog("./data/forest.structure.metrics")
# set coordinate system
sp::proj4string(cata) <- sp::CRS(SRS_string = "EPSG:2154")
# set sensor type
......@@ -132,9 +124,9 @@ summary(a@data)
The next step is to compute the canopy height model (CHM). It will be used to derive:
* 2D canopy height metrics related to multi-scale vertical hetererogeneity (mean and standard deviation of CHM, smoothed at different scales)
+ tree metrics from tree top detection
+ gap metrics from gap extraction
* 2D canopy height metrics related to multi-scale vertical heterogeneity (mean and standard deviation of CHM, smoothed at different scales)
+ tree metrics from tree top segmentation
+ gaps and edges metrics from gap extraction
The CHM is computed and NA values are replaced by 0. A check is performed to make sure low or high points are not present.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment