{"id":19553568,"url":"https://github.com/opengeos/whiteboxr","last_synced_at":"2026-04-02T17:46:44.180Z","repository":{"id":34087368,"uuid":"166910797","full_name":"opengeos/whiteboxR","owner":"opengeos","description":"WhiteboxTools R Frontend","archived":false,"fork":false,"pushed_at":"2024-02-07T22:16:18.000Z","size":14410,"stargazers_count":166,"open_issues_count":4,"forks_count":30,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-01T15:41:06.702Z","etag":null,"topics":["geomorphometry","geoprocessing","geospatial","gis","hydrology","r","remote-sensing","rstats","rstudio"],"latest_commit_sha":null,"homepage":"https://whiteboxR.gishub.org","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opengeos.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-22T02:09:29.000Z","updated_at":"2024-05-17T16:00:42.449Z","dependencies_parsed_at":"2023-01-15T04:45:25.575Z","dependency_job_id":"fe50881c-0c61-4104-a67d-73b9c77857ee","html_url":"https://github.com/opengeos/whiteboxR","commit_stats":{"total_commits":320,"total_committers":4,"mean_commits":80.0,"dds":"0.32499999999999996","last_synced_commit":"200b57027cea371ed7054564e44c92b904ba08c5"},"previous_names":["giswqs/whiteboxr"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengeos%2FwhiteboxR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengeos%2FwhiteboxR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengeos%2FwhiteboxR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengeos%2FwhiteboxR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opengeos","download_url":"https://codeload.github.com/opengeos/whiteboxR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242680,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geomorphometry","geoprocessing","geospatial","gis","hydrology","r","remote-sensing","rstats","rstudio"],"created_at":"2024-11-11T04:23:48.851Z","updated_at":"2026-04-02T17:46:44.147Z","avatar_url":"https://github.com/opengeos.png","language":"R","funding_links":["https://buymeacoffee.com/giswqs"],"categories":[],"sub_categories":[],"readme":"---\noutput: md_document\n---\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  dev = 'jpeg',\n  out.width = \"100%\"\n)\n```\n\n# whitebox\n\n\u003c!-- badges: start --\u003e\n[![CRAN\\_Status\\_Badge](https://www.r-pkg.org/badges/version/whitebox)](https://cran.r-project.org/package=whitebox)\n[![CRAN download count](https://cranlogs.r-pkg.org/badges/grand-total/whitebox)](https://cranlogs.r-pkg.org/badges/grand-total/whitebox)\n[![whitebox Manual](https://img.shields.io/badge/docs-HTML-informational)](https://whiteboxR.gishub.org/reference/index.html)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/license/MIT)\n[![R-CMD-check](https://github.com/opengeos/whiteboxR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/opengeos/whiteboxR/actions/workflows/R-CMD-check.yaml)\n[![codecov](https://codecov.io/gh/opengeos/whiteboxR/branch/master/graph/badge.svg)](https://app.codecov.io/gh/opengeos/whiteboxR)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/brownag/whitebox-r-binder/master?urlpath=rstudio)\n[![Donate](https://img.shields.io/badge/Donate-Buy%20me%20a%20coffee-yellowgreen.svg)](https://buymeacoffee.com/giswqs)\n\u003c!-- badges: end --\u003e\n\n**WhiteboxTools** R Frontend.\n\nThis repository is related to the **whitebox** R package for geospatial analysis, which is an R frontend of a stand-alone executable command-line program called **[WhiteboxTools](https://github.com/jblindsay/whitebox-tools)**. \n\n* Authors: John Lindsay (\u003chttps://jblindsay.github.io/ghrg/index.html\u003e)\n* Contributors: \n    * Qiusheng Wu (\u003chttps://wetlands.io\u003e)\n    * Andrew G. Brown (\u003chttps://humus.rocks\u003e)\n* GitHub repo: \u003chttps://github.com/opengeos/whiteboxR\u003e\n* CRAN link: \u003chttps://cran.r-project.org/package=whitebox\u003e\n* WhiteboxTools: \u003chttps://github.com/jblindsay/whitebox-tools\u003e\n* User Manual: \u003chttps://jblindsay.github.io/wbt_book/\u003e\n* Free software: [MIT license](https://opensource.org/license/MIT)\n\n\n**Contents**\n\n1. [Description](#description)\n2. [Installation](#installation)\n3. [Usage](#usage)\n4. [Available Tools](#available-tools)\n5. [Contributing](#contributing)\n6. [License](#license)\n7. [Reporting Bugs](#reporting-bugs)\n\n## Description\n\nThe **whitebox** R package is built on **WhiteboxTools**, an advanced geospatial data analysis platform developed by Prof. John Lindsay ([webpage](https://jblindsay.github.io/ghrg/index.html); [jblindsay](https://github.com/jblindsay)) at the University of Guelph's [Geomorphometry and Hydrogeomatics Research Group](https://jblindsay.github.io/ghrg/index.html). *WhiteboxTools* can be used to perform common geographical information systems (GIS) analysis operations, such as cost-distance analysis, distance buffering, and raster reclassification. Remote sensing and image processing tasks include image enhancement (e.g. panchromatic sharpening, contrast adjustments), image mosaicing, numerous filtering operations, simple classification (k-means), and common image transformations. *WhiteboxTools* also contains advanced tooling for spatial hydrological analysis (e.g. flow-accumulation, watershed delineation, stream network analysis, sink removal), terrain analysis (e.g. common terrain indices such as slope, curvatures, wetness index, hillshading; hypsometric analysis; multi-scale topographic position analysis), and LiDAR data processing. LiDAR point clouds can be interrogated (LidarInfo, LidarHistogram), segmented, tiled and joined, analyzed for outliers, interpolated to rasters (DEMs, intensity images), and ground-points can be classified or filtered. *WhiteboxTools* is not a cartographic or spatial data visualization package; instead it is meant to serve as an analytical backend for other data visualization software, mainly GIS. Suggested citation: Lindsay, J. B. (2016). Whitebox GAT: A case study in geomorphometric analysis. _Computers \u0026 Geosciences_, 95, 75-84. doi: http://dx.doi.org/10.1016/j.cageo.2016.07.003\n\n## Installation\n\nThere are three ways to install the **whitebox** R package.\n\n### 1. CRAN\n\n**whitebox** is now available on [CRAN](https://cran.r-project.org/package=whitebox), so you can install it with:\n\n```R\ninstall.packages(\"whitebox\")\n```\n\n### 2. GitHub\n\nYou can alternatively install the development version of **whitebox** from [GitHub](https://github.com/opengeos/whiteboxR) as follows:\n\n```R\nif (!require(\"remotes\")) install.packages('remotes')\nremotes::install_github(\"opengeos/whiteboxR\", build = FALSE)\n```\n\n## Usage\n\nThe function `wbt_init()` checks the path to the 'WhiteboxTools' binary.\n\n```r\nwbt_init()\n```\nIt (invisibly) returns a logical (TRUE/FALSE) value reflecting whether a file is found at one of the default paths, including those specified by package options. See `?whitebox::whitebox`.\n \nIf you have 'WhiteboxTools' installed already but in a non-standard location run `wbt_init(exe_path=...)` to set up your options for your current R session.\n\n```{r, eval=FALSE}\nwbt_init(exe_path = 'C:/home/user/path/to/whitebox_tools.exe')\n```\n\nAdditional arguments to `wbt_init()` can set other package options, such as whether tools print their standard console output with `cat()`.\n\nIf you want to turn this off, set `verbose = FALSE`, for instance:\n\n```{r, eval=FALSE}\nwbt_init(exe_path = 'C:/home/user/path/to/whitebox_tools.exe', verbose = FALSE)\n```\n\n## Documentation\n\nFor whitebox package documentation in R, ask for help:\n\n```r\n??whitebox\n```\n\nFor list of functions, try the `wbt_` prefix in your search:\n\n```r\n??wbt_\n```\n\nA complete list of functions available in the **whitebox** R package can be found [HERE](https://whiteboxR.gishub.org/reference/index.html). \n\nCheck out this [demo](https://whiteboxR.gishub.org/articles/demo.html) for examples.\n\n## Installing 'WhiteboxTools' \n\nThe quickest way to get started if you are on 64-bit Windows, Linux or MacOS architectures is to download and install the 'WhiteboxTools' binary. Linux binaries compiled with 'musl' instead of 'glibc' on Ubuntu 22.04 are available with `platform=\"linux_musl\"`. On MacOS, Intel and Apple 'M' series processors ('arm64') are supported.\n\nA method `install_whitebox()` is provided to download a version of the binaries that corresponds to the wrapper functions available in the package.\n\n```{r, eval=FALSE}\nwhitebox::install_whitebox()\n```\n\nBy default this will install 'WhiteboxTools' to your whitebox R package data directory (see `wbt_data_dir()`), subdirectory \"WBT\".\n\n## whitebox\n\n**How do I run tools?**\n\nTool names in the whitebox R package can be called by corresponding function using `wbt_snake_case()` naming convention (e.g. `wbt_lidar_info()` R function for `\"LidarInfo\"` 'WhiteboxTools' tool name).\n\nFirst we load the library and perform any necessary setup. \n\n```{R}\nlibrary(whitebox)\n\n# set up as needed\nwbt_init()\n```\n\nMany 'WhiteboxTools' will take GeoTIFF files as input, but 'WhiteboxTools' supports several grid input formats. There is a sample Digital Elevation Model (DEM) included in the whitebox package. You can get path as follows for this demo:\n\n```{R}\n# Set input raster DEM file\ndem \u003c- sample_dem_data()\n```\n\nWe will use this DEM in a sequence of 'WhiteboxTools' processing routines. \nRun tools by passing file paths for the input and output files. \n\n 1. Apply feature-preserving smoothing (_FeaturePreservingSmoothing_)\n \n 2. Breach depressions in a DEM (_BreachDepressions_)\n \n 3. Calculate D-Infinity flow accumulation (_DInfFlowAccumulation_)\n\nThe `filter` argument to `wbt_feature_preserving_smoothing()` sets the size of the filter kernel.\n\n```{r}\n## 1. FeaturePreservingSmoothing\nwbt_feature_preserving_smoothing(\n  dem = dem,\n  output = \"./smoothed.tif\",\n  filter = 9\n)\n\n## 2. BreachDepressions\nwbt_breach_depressions(dem = \"./smoothed.tif\", output = \"./breached.tif\")\n\n## 3. DInfFlowAccumulation\nwbt_d_inf_flow_accumulation(input = dem, output = \"./flow_accum.tif\")\n```\n\n```{r terra-plot-facc}\nif (requireNamespace('terra')) {\n  terra::plot(terra::rast(\"./flow_accum.tif\"))\n}\n```\n\n**About 'WhiteboxTools'**\n\n```{r}\nlibrary(whitebox)\n\n# cat() output in non-interactive mode\nwbt_verbose(TRUE)\n\n# Prints the whitebox-tools help...a listing of available commands\nwbt_help()\n\n# Prints the whitebox-tools license\nwbt_license()\n\n# Prints the whitebox-tools version\nwbt_version()\n\n# Prints the toolbox for a specific tool.\nwbt_toolbox(\"AsciiToLas\")\n\n# Lists tools with 'lidar' in tool name or description.\nwbt_list_tools(\"lidar\")\n\n# Prints the help for a specific tool.\nwbt_tool_help(\"lidar_info\")\n\n# Retrieves the tool parameter descriptions for a specific tool.\nwbt_tool_parameters(\"slope\")\n\n# View the source code for a specific tool on the source code repository.\nwbt_view_code(\"breach_depressions\")\n```\n\n## Available Tools\n\nThe **[WhiteboxTools](https://github.com/jblindsay/whitebox-tools)** library currently contains more than **`r nrow(wbttools)`** tools, which are each grouped based on their main function into one of the following categories: Data Tools, GIS Analysis, Hydrological Analysis, Image Analysis, LiDAR Analysis, Mathematical and Statistical Analysis, Stream Network Analysis, and Terrain Analysis. For a listing of available tools, complete with documentation and usage details, please see the ['WhiteboxTools' User Manual](https://jblindsay.github.io/wbt_book/available_tools/index.html).\n\nIf you are interested in using the 'WhiteboxTools' command-line program, check ['WhiteboxTools' Usage](https://github.com/jblindsay/whitebox-tools#3-usage)\n\n## Contributing\n\nIf you would like to contribute to the project as a developer, follow these instructions to get started:\n\n1. Fork the whiteboxR repository (\u003chttps://github.com/opengeos/whiteboxR\u003e)\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\nUnless explicitly stated otherwise, any contribution intentionally submitted for inclusion in the work shall be licensed as the [MIT license](https://opensource.org/license/MIT) without any additional terms or conditions.\n\n\n## License\n\nThe whitebox **R** package is distributed under the [MIT license](https://opensource.org/license/MIT), a permissive open-source (free software) license.\n\n\n## Reporting Bugs\n\nwhitebox is distributed as is and without warranty of suitability for application. If you encounter flaws with the software (i.e. bugs) please report the issue. Providing a detailed description of the conditions under which the bug occurred will help to identify the bug. *Use the [Issues tracker](https://github.com/opengeos/whiteboxR/issues) on GitHub to report issues with the software and to request feature enchancements.* Please do not email Dr. Lindsay directly with bugs.\n\n\n```{r, echo = FALSE}\nunlink(c(\"smoothed.tif\",\"breached.tif\",\"flow_accum.tif\"))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeos%2Fwhiteboxr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengeos%2Fwhiteboxr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeos%2Fwhiteboxr/lists"}