Getting Started

Load the package

Load Whitebox.jl into your project with:

import Whitebox as wbt

Loading the package automatically configures your WhiteboxTools session by:

  • Setting the working directory for WhiteboxTools to your current working directory (found with pwd())
  • Setting the the path to the WhiteboxTools version that was installed with Whitebox.jl
  • Setting up miscellaneous defaults such as the printing of results

In other words, just load the package and you should be good to go! Read more about this in How it works.

Find tools

WhiteboxTools contains approximately 485 tools that are organized into the following thematic toolboxes:

Whitebox.jl provides a function to use each of the the tools provided by WhiteboxTools. Functions in Whitebox.jl use the snake_case convention for WhiteboxTools tool names.

For example, to use the AbsoluteValue tool, you would use wbt.absolute_value().

View the Whitebox.jl Reference section for a full list of available functions and documentation.

Run tools

Function arguments for Whitebox.jl functions are keyword arguments, so the arguments must be included in the function call.

For example, use:

wbt.absolute_value(i = "DEM.tif", output = "abs_val.tif") # This works! ๐Ÿ’ฏ ๐ŸŽ‰

rather than:

wbt.absolute_value("DEM.tif", "abs_val.tif") # <- This won't work! ๐Ÿ‘Ž

Function help

We have a few different ways to find the required arguments or documentation for a function:

  • Visit the WhiteboxTools user manual and look at the Python example for a function (those use snake_case too)
  • Run wbt.tool_parameters(tool_name::String), or
  • Enter help?> mode in the Julia REPL (Press ?), and search your function name