-
Notifications
You must be signed in to change notification settings - Fork 0
/
03a-SiteParacou.Rmd
executable file
·72 lines (63 loc) · 2.78 KB
/
03a-SiteParacou.Rmd
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
```{r setupsiteparacou, include=FALSE}
rm(list = ls()) ; invisible(gc()) ; set.seed(42)
library(knitr)
library(tidyverse)
library(raster)
library(leaflet)
library(sf)
library(lidR)
theme_set(bayesplot::theme_default())
opts_chunk$set(
echo = F, message = F, warning = F, fig.height = 6, fig.width = 8,
cache = T, cache.lazy = F)
```
```{r datasiteparacou, include = F}
crs <- '+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0' # global crs definition
p <- read_csv(file = "data/Paracou/trees/Paracou TREEMUTATION candidates.csv") %>%
st_as_sf(coords = c("lon", "lat"),
crs = '+proj=utm +zone=22 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0') %>%
mutate(name = `ns1:name`) # some columns with the name need to be named `name`
# p %>%
# dplyr::select(name, geometry) %>%
# st_write(dsn = "data/Paracou/trees/Paracou TREEMUTATION candidates.gpx",
# delete_dsn = T, driver = "GPX", layer = "waypoints")
limits <- shapefile("data/Paracou/limits/OverallPlots.shp")
limits <- spTransform(limits, CRSobj = crs)
dcm2004 <- raster("data/Paracou/lidar/Paracou2004_MNC1m.asc")
dcm2009 <- raster("data/Paracou/lidar/MNC_ParacouAvril2009_1m.tif")
dcm2013 <- raster("data/Paracou/lidar/ParacouMNS1m2013.asc")
dcm2015 <- raster("data/Paracou/lidar/ParacouMNS1m2015.asc")
dem <- raster("data/Paracou/lidar/DEM_1m_2015.tif") # for CRS
projection(dcm2004) <- projection(dem)
projection(dcm2009) <- projection(dem)
projection(dcm2013) <- projection(dem)
projection(dcm2015) <- projection(dem)
# dcm2004 <- projectRaster(dcm2004, crs = crs)
# dcm2009 <- projectRaster(dcm2009, crs = crs)
# dcm2013 <- projectRaster(dcm2013, crs = crs)
# dcm2015 <- projectRaster(dcm2015, crs = crs)
rm(dem)
```
# Site
This chapter support the choice of site for the study.
## Paracou
Plus:
* 4 LiDAR campaigns from 2004 to 2015 (Fig. \@ref(fig:paracouMap))
* Proximity, (for phenology to collect flowers and fruits)
Cons:
* Smaller trees
* Non destructive sampling
* Avoid trunk
```{r paracouMap, fig.cap="Paracou individuals and MNC since 2004 LiDAR campaigns.", eval=FALSE}
leaflet() %>%
addTiles() %>%
addRasterImage(aggregate(dcm2004, 4), colors = "Greys", group = "DCM 2004") %>%
addRasterImage(aggregate(dcm2009, 4), colors = "Greys", group = "DCM 2009") %>%
addRasterImage(aggregate(dcm2013, 4), colors = "Greys", group = "DCM 2013") %>%
addRasterImage(aggregate(dcm2015, 4), colors = "Greys", group = "DCM 2015") %>%
addPolylines(data = limits, color = 'black', group = "Plots") %>%
addCircles(data = p, group = "Individuals", col = "red", radius = 30) %>%
addLayersControl(overlayGroups = c("DCM 2004", "DCM 2009", "DCM 2013", "DCM 2015",
'Plots', 'Individuals'),
options = layersControlOptions(collapsed = T))
```