Commit aa493d34 authored by Björn Reineking's avatar Björn Reineking
Browse files

Initial commit

parents
No related merge requests found
Showing with 106 additions and 0 deletions
+106 -0
^wbtr\.Rproj$
^\.Rproj\.user$
.gitignore 0 → 100644
.Rproj.user
.Rhistory
.RData
.Ruserdata
00_create_wbtr.R
*.zip
DESCRIPTION 0 → 100644
Package: wbtr
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.9000
Authors@R:
person(given = "First",
family = "Last",
role = c("aut", "cre"),
email = "first.last@example.com")
Description: What the package does (one paragraph).
License: What license it uses
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.0
NAMESPACE 0 → 100644
# Generated by roxygen2: do not edit by hand
export(download_wbt)
export(flow_accumulation_full_workflow)
#' @export
download_wbt <- function(){
os <- tolower(Sys.info()['sysname'])
if (os == "darwin") download.file("http://www.uoguelph.ca/~hydrogeo/WhiteboxTools/WhiteboxTools_darwin_amd64.zip",
"WhiteboxTools_darwin_amd64.zip")
if (os == "windows") download.file("http://www.uoguelph.ca/~hydrogeo/WhiteboxTools/WhiteboxTools_win_amd64.zip",
"WhiteboxTools_win_amd64.zip")
if (os == "linux") download.file("http://www.uoguelph.ca/~hydrogeo/WhiteboxTools/WhiteboxTools_linux_amd64.tar.xz",
"WhiteboxTools_linux_amd64.tar.xz")
}
#' @export
flow_accumulation_full_workflow <- function(dem,
out_dem,
out_pntr,
out_accum,
out_type="Specific Contributing Area",
wd = getwd(),
log=FALSE,
clip=FALSE,
esri_pntr=FALSE,
callback='default_callback',
wbt_path = system.file("ext", package = "wbtr")) {
system(paste0(file.path(wbt_path, "whitebox_tools"), " -r=FlowAccumulationFullWorkflow",
" -v", " --wd=", wd, " --dem=", dem, " --out_dem=", out_dem,
" --out_pntr=", out_pntr, " --out_accum=", out_accum,
" --out_type=", out_type)) # --log --clip
}
#' @keywords internal
"_PACKAGE"
README.md 0 → 100644
# wbtr
The goal of wbtr is to provide easy access to the WhiteboxTools for geospatial data analysis (https://www.uoguelph.ca/~hydrogeo/WhiteboxTools/index.html)
## Installation
You can install the released version of wbtr from [gitlab](https://gitlab.irstea.fr) with:
``` r
library(devtools)
devtools::install_git('https://gitlab.irstea.fr/bjoern.reineking/wbtr.git')
```
You will have to install the WhiteboxTools binaries from https://www.uoguelph.ca/~hydrogeo/WhiteboxTools/download.html and place them in the "ext" folder of the wbtr package.
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wbtr-package.R
\docType{package}
\name{wbtr-package}
\alias{wbtr}
\alias{wbtr-package}
\title{wbtr: What the Package Does (One Line, Title Case)}
\description{
What the package does (one paragraph).
}
\author{
\strong{Maintainer}: First Last \email{first.last@example.com}
}
\keyword{internal}
wbtr.Rproj 0 → 100644
Version: 1.0
RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
Supports Markdown
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