About Whitebox:
Whitebox is an advanced open-source geospatial analysis platform. It provides a wide range of tools for processing raster and vector geospatial data, with a focus on terrain analysis, hydrology, and environmental modeling. Whitebox is designed for both researchers and professionals, offering a user-friendly interface and powerful scripting capabilities.
This is a containerized version of WhiteboxGIS tools that implements workflows for a number of analyses. It follows the Tool Specification for reusable research software using Docker.
Description: Returns the output of WhiteboxGIS version information.
Parameters:
toFile
(bool): IfTrue
, anINFO.txt
file will be written (default:true
).
Description: Produces the required raster (.TIFF) files for running the CATFLOW Hillslope Wizard Tool using Whitebox GIS.
Parameters:
stream_threshold
(float): Threshold in flow accumulation values for channelization (extracting streams).
Data:
dem
(file): The input DEM file to be used for running the tool (.TIFF/.TIF format).- Example:
/in/dem.tif
.
- Example:
Output:
- Multiple raster files including filled DEM, aspect, flow accumulation, flow direction, streams, hillslopes, elevation above stream, and downslope distance to stream, saved to
/out/
.
Description: Merges multiple TIFF files into a single raster file using Whitebox GIS.
Parameters:
method
(string): Resampling method to use for merging. Options are:nn
: Nearest Neighbor.bilinear
: Bilinear Interpolation.cc
: Cubic Convolution.
Data:
input_files
(list): List of input TIFF files to merge (.TIFF/.TIF format).- Example:
["/in/elevation_1100_part_1.tif", "/in/elevation_1100_part_2.tif"]
or/in/*.tif
.
- Example:
Output:
- Merged raster file saved to
/out/dem.tif
.
-
Prepare Input Files:
Place your input files (e.g., DEMs or TIFFs) in the/in
directory. -
Configure Input JSON:
Edit theinput.json
file to specify parameters and data for the desired tool.Example for merging TIFFs:
{ "merge_tifs": { "parameters": { "method": "nn" }, "data": { "input_files": [ "/in/elevation_1100_part_1.tif", "/in/elevation_1100_part_2.tif" ] } } }
-
Install Docker and Build the Container:
-
Install Docker:
Download and install Docker Desktop from https://www.docker.com/products/docker-desktop/ and follow the installation instructions for your operating system. -
Build the Docker image:
Open a terminal or command prompt in the project directory and run:docker build -t whitebox .
-
-
Run with Docker:
Use the following command to run the tool (replacewhitebox
with your Docker image name):Note:
Make sure to mount your local input and output directories to the container's/in
and/out
directories using the-v
option.
For example, if your local input files are inlocal/in
and you want outputs inlocal/out
, use:For PowerShell:
docker run --rm -it ` -v "${PWD}/local/in:/in" ` -v "${PWD}/local/out:/out" ` -e TOOL_RUN=merge_tifs ` whitebox
For Command Prompt:
docker run --rm -it ^ -v "%cd%/local/in:/in" ^ -v "%cd%/local/out:/out" ^ -e TOOL_RUN=merge_tifs ^ whitebox
(Adjust the paths as needed for your environment.)
-
Input Directory (
/in
):
Place all required input files here.
Example:/in/dem.tif
,/in/elevation_1100_part_1.tif
, etc. -
Output Directory (
/out
):
All generated files will be saved here.
Example:/out/dem.tif
,/out/fill_DEM.tif
, etc. -
Input JSON Example (Merge TIFFs):
{ "merge_tifs": { "parameters": { "method": "nn" }, "data": { "input_files": [ "/in/elevation_1100_part_1.tif", "/in/elevation_1100_part_2.tif" ] } } }
-
Input JSON Example (CATFLOW Hillslope Generator):
{ "hillslope_generator": { "parameters": { "stream_threshold": 1000 }, "data": { "dem": "/in/dem.tif" } } }
-
Build the Docker image:
docker build -t whitebox .
-
Run the container: (See Usage for platform-specific examples.)
- Source code is located in the
/src
directory. - To add new tools or modify existing ones, edit the Python files in
/src
and updatetool.yml
as needed. - Contributions are welcome! Please open issues or pull requests on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.