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

Updated coregistration

parent 696c95b5
--- ---
title: "Workflow for plot coregistration with ALS data" title: "R workflow for field plot coregistration with ALS data"
author: "Jean-Matthieu Monnet" author: "Jean-Matthieu Monnet"
date: "Jan 28, 2021" date: "`r Sys.Date()`"
output: output:
pdf_document: default pdf_document: default
html_document: default html_document: default
bibliography: workflow.treedetection.bib bibliography: "./bib/bibliography.bib"
--- ---
```{r setup, include=FALSE} ```{r setup, include=FALSE}
# library(knitr)
knitr::opts_chunk$set(echo = TRUE) knitr::opts_chunk$set(echo = TRUE)
# Set so that long lines in R will be wrapped: # 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(tidy.opts=list(width.cutoff=80),tidy=TRUE)
...@@ -18,21 +17,9 @@ knitr::opts_chunk$set(fig.align = "center") ...@@ -18,21 +17,9 @@ knitr::opts_chunk$set(fig.align = "center")
--- ---
This workflow compares a canopy height model (CHM) derived from airborne laser scanning (ALS) data and inventoried tree positions, and proposes a translation in plot position for better matching. It works with circular plots. The method is described in @Monnet2014. The workflow uses field and ALS data acquired in the forest of Lac des Rouges Truites. It is based on functions from packages `lidaRtRee` and `lidR`. This workflow compares a canopy height model (CHM) derived from airborne laser scanning (ALS) data with tree positions inventoried in the field, and then proposes a translation in plot position for better matching. The method is described in @Monnet2014. Here it is exemplified with circular plots, but it can be applied to any shape of field plots. The workflow is based on functions from packages `lidaRtRee` and `lidR`. Example data were acquired in the forest of Lac des Rouges Truites (Jura, France).
Licence: CC BY Licence: CC BY / [Source page](https://gitlab.irstea.fr/jean-matthieu.monnet/lidartree_tutorials/-/blob/master/coregistration.Rmd)
Source page: https://gitlab.irstea.fr/jean-matthieu.monnet/lidaRtRee/wikis/forest-plot-coregistration-workflow
Changelog:
* Jan, 2021: checked compatibility with lidR 3.1.0 and lidaRtRee 3.0.0
+ Oct, 2020: checked compatibility with lidR 3.0.3
+ Feb, 2019: checked compatibility with lidR 2.0.0 and lidaRtRee 2.0.0
+ May, 2018: initial version
```{r include = FALSE}
library(lidR)
```
## Material ## Material
...@@ -49,7 +36,7 @@ The study area is a part of the forest of Lac des Rouges Truites. 44 plots have ...@@ -49,7 +36,7 @@ The study area is a part of the forest of Lac des Rouges Truites. 44 plots have
```{r plots, include = TRUE} ```{r plots, include = TRUE}
# load plot coordinates (data.frame with lines corresponding to the las objects) # load plot coordinates (data.frame with lines corresponding to the las objects)
load(file="./data.coregistration/plotsCoregistration.rda") load(file="./data/coregistration/plotsCoregistration.rda")
head(p, n=3L) head(p, n=3L)
``` ```
...@@ -68,7 +55,7 @@ On each plot, five trees which were considered suitable for coregistration (ver ...@@ -68,7 +55,7 @@ On each plot, five trees which were considered suitable for coregistration (ver
```{r trees, include = TRUE} ```{r trees, include = TRUE}
# load inventoried trees (data.frame with plot id info ) # load inventoried trees (data.frame with plot id info )
load(file="./data.coregistration/treesCoregistration.rda") load(file="./data/coregistration/treesCoregistration.rda")
head(ap, n=3L) head(ap, n=3L)
``` ```
...@@ -76,11 +63,11 @@ head(ap, n=3L) ...@@ -76,11 +63,11 @@ head(ap, n=3L)
Airborne laser scanning data on the study area is part of a campaign acquired in 2016 with an airborne RIEGL LMS Q680i sensor. Acquisition was funded by the Région Franche-Comté. Airborne laser scanning data on the study area is part of a campaign acquired in 2016 with an airborne RIEGL LMS Q680i sensor. Acquisition was funded by the Région Franche-Comté.
ALS data over the plots is provided as a list of LAS objects in rda file. ALS data over the plots is provided as a list of LAS objects in `rda` file.
```{r las, include = TRUE} ```{r las, include = TRUE}
# load point cloud over reference plots (list of las objects) # load point cloud over reference plots (list of las objects)
load(file="./data.coregistration/lasCoregistration.rda") load(file="./data/coregistration/lasCoregistration.rda")
``` ```
Display point cloud of plot 1. Display point cloud of plot 1.
...@@ -102,7 +89,7 @@ las <- lidR::clip_circle(cata, p$XGPS, p$YGPS, p.radius + b.size + 5) ...@@ -102,7 +89,7 @@ las <- lidR::clip_circle(cata, p$XGPS, p$YGPS, p.radius + b.size + 5)
# normalize heights if point cloud are not already normalized # normalize heights if point cloud are not already normalized
las <- lapply(las, function(x) {lidR::normalize_height(x, lidR::tin())}) las <- lapply(las, function(x) {lidR::normalize_height(x, lidR::tin())})
# save as rda file for later use # save as rda file for later use
save(las, file="./data.coregistration/lasCoregistration.rda") save(las, file="./data/coregistration/lasCoregistration.rda")
``` ```
## Parameters ## Parameters
...@@ -149,7 +136,7 @@ raster::plot(chmfilt, main="Filtered canopy height model") ...@@ -149,7 +136,7 @@ raster::plot(chmfilt, main="Filtered canopy height model")
The trees corresponding to the plot are extracted, and a plot mask is computed from the plot center and radius. The trees corresponding to the plot are extracted, and a plot mask is computed from the plot center and radius.
```{r mask, include = TRUE, out.width = '60%', fig.dim=c(5.5, 4.5), warning="FALSE" } ```{r mask, include = TRUE, out.width = '50%', fig.dim=c(5.5, 4.5), warning=FALSE}
# plot centre # plot centre
centre <- p[i,c("XGPS","YGPS")] centre <- p[i,c("XGPS","YGPS")]
# extract plot trees # extract plot trees
......
This diff is collapsed.
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