Whitebox.jl
A Julia frontend for WhiteboxTools
WhiteboxTools is an open-source command-line program for geospatial analysis created by Dr. John Lindsay.
Whitebox.jl installs WhiteboxTools (v2.1.0) and allows users to run any WhiteboxTools function from Julia.
Notes
- Whitebox.jl is not affiliated with WhiteboxTools.
- This package is in active development and testing.
- Report bugs here.
Installation
Whitebox.jl can be installed from the Pkg REPL (press ] in the Julia REPL):
pkg> add WhiteboxOr directly from GitHub:
using Pkg
Pkg.add(url = "https://github.com/acgold/Whitebox.jl.git")Installing Whitebox.jl will automatically install a version of WhiteboxTools within the Whitebox.jl package directory (see more about this in How it works)
Quick Example
Adapted from the Python frontend example.
import Whitebox as wbt
# Some helper functions
wbt.version()
wbt.help()
# Set working directory to your data location. By default, it is your project's working directory (found via `pwd()`)
wbt.set_working_dir(joinpath(pwd(),"Data"))
# Set the verbose mode to `false` if you want less printing
wbt.set_verbose_mode(false)
# Run some hydrology tools!
wbt.feature_preserving_smoothing(dem = "DEM.tif", output = "smoothed.tif")
wbt.breach_depressions(dem = "smoothed.tif", output = "breached.tif")
wbt.d_inf_flow_accumulation(i = "breached.tif", output = "flow_accum.tif")