-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
85 lines (62 loc) · 2.43 KB
/
README.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
73
74
75
76
77
78
79
80
81
82
83
84
85
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# GeoMorphTB
GeoMorphTB is an open-source approach for Evan's ArcGIS Geomorphometry & Gradient Metrics Toolbox ([here](http://evansmurphy.wixsite.com/evansspatial/arcgis-gradient-metrics-toolbox)). As open-source software solution GRASS GIS 7.x is used through [RQGIS](https://github.com/jannes-m/RQGIS) functionalities.
Currently, the following functions and algorithms are supported:
* **Directionality**
+ Classify Aspect
+ Linear Aspect
+ Mean Slope
* **Statistics**
+ Correlation
* **Surface Texture**
+ Dissection
+ Landform
+ Roughness
+ Roughness Index (Add-on, Cavalli et al. 2008)
+ Slope Position
+ Surface Area Ratio
+ Surface Relief Ratio
* **Temperature and Moisture**
+ 2nd Derivative Slope
+ Site Exposure Index
+ Slope/Aspect Transformation
# Installation
## Package installation
In order to use GeoMorphTB, RQGIS needs to be installed properly (see `vignette("install_guide", package = "RQGIS")`).
You can install:
- the latest GeoMorphTB development version from Github with:
```{r, eval = FALSE}
devtools::install_github("raff-k/GeoMorphTB")
```
# GeoMorphTB usage
The usage of GeoMorphTB is straightforward, simply based on the need of a digital elevation model.
In the following example we gonna use the dem of the RQGIS-package.
```{r get_dem, warning = FALSE, error = FALSE, message = FALSE}
# attach packages
library("raster")
library("RQGIS")
# set the RQGIS-environment
RQGIS::set_env()
# get digital elevation model
dem <- RQGIS::dem
# dem is of class "RasterLayer"
```
Now, we can already start computing the implemented gradient and geomorphometric parameters.
```{r, fig.width = 5, fig.height = 5, align = "center", warning = FALSE, error = FALSE, eval=TRUE}
# attach RQGIS
library("GeoMorphTB")
# computation of dissection
dis <- GeoMorphTB::dissection(elevation = dem)
# get summary and plot of result
summary(raster::values(dis))
raster::plot(dis)
```
The result of the function is automatically loaded into R.
However, if you do not want the file loaded in R, but stored on the hard disk, you can specify the function call as in the following example:
```{r, warning = FALSE, error = FALSE}
# as default, the file is saved to the current working directory
GeoMorphTB::roughness(elevation = dem, load_output = FALSE, output = file.path(tempdir(), "roughness.tif"))
```