Whitebox Intro
Using WhiteboxTools with ipyleaflet
- WhiteboxTools: https://github.com/jblindsay/whitebox-tools
- WhiteboxTools frontends:
whiteboxgui¶
In [1]:
Copied!
import whiteboxgui
import whiteboxgui
C:\Users\Sarath_Kin\miniconda3\envs\demo311\Lib\site-packages\whiteboxgui\whiteboxgui.py:6: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources
Downloading WhiteboxTools pre-compiled binary for first time use ...
Downloading WhiteboxTools binary from https://www.whiteboxgeo.com/WBT_Windows/WhiteboxTools_win_amd64.zip
Decompressing WhiteboxTools_win_amd64.zip ...
WhiteboxTools package directory: C:\Users\Sarath_Kin\miniconda3\envs\demo311\Lib\site-packages\whitebox
Downloading testdata ...
In [2]:
Copied!
whiteboxgui.show()
whiteboxgui.show()
Out[2]:
In [3]:
Copied!
whiteboxgui.show(tree=True)
whiteboxgui.show(tree=True)
Out[3]:
whitebox¶
In [4]:
Copied!
import os
import pkg_resources
import whitebox
import os
import pkg_resources
import whitebox
In [5]:
Copied!
wbt = whitebox.WhiteboxTools()
print(wbt.version())
wbt = whitebox.WhiteboxTools()
print(wbt.version())
WhiteboxTools v2.4.0 (c) Dr. John Lindsay 2017-2023 WhiteboxTools is an advanced geospatial data analysis platform developed at the University of Guelph's Geomorphometry and Hydrogeomatics Research Group (GHRG). See www.whiteboxgeo.com for more details.
In [6]:
Copied!
print(wbt.help())
print(wbt.help())
WhiteboxTools Help The following commands are recognized: --cd, --wd Changes the working directory; used in conjunction with --run flag. --compress_rasters Sets the compress_raster option in the settings.json file; determines if newly created rasters are compressed. e.g. --compress_rasters=true -h, --help Prints help information. -l, --license Prints the whitebox-tools license. Tool names may also be used, --license="Slope" --listtools Lists all available tools. Keywords may also be used, --listtools slope. --max_procs Sets the maximum number of processors used. -1 = all available processors. e.g. --max_procs=2 -r, --run Runs a tool; used in conjunction with --wd flag; -r="LidarInfo". --toolbox Prints the toolbox associated with a tool; --toolbox=Slope. --toolhelp Prints the help associated with a tool; --toolhelp="LidarInfo". --toolparameters Prints the parameters (in json form) for a specific tool; --toolparameters="LidarInfo". -v Verbose mode. Without this flag, tool outputs will not be printed. --viewcode Opens the source code of a tool in a web browser; --viewcode="LidarInfo". --version Prints the version information. Example Usage: >> .\whitebox_tools.exe -r=lidar_info --cd="\path\to\data\" -i=input.las --vlr --geokeys
In [7]:
Copied!
data_dir = os.path.dirname(pkg_resources.resource_filename("whitebox", 'testdata/'))
print(data_dir)
data_dir = os.path.dirname(pkg_resources.resource_filename("whitebox", 'testdata/'))
print(data_dir)
C:\Users\Sarath_Kin\miniconda3\envs\demo311\Lib\site-packages\whitebox\testdata
In [8]:
Copied!
in_dem = os.path.join(data_dir, "DEM.tif")
in_dem = os.path.join(data_dir, "DEM.tif")
In [9]:
Copied!
work_dir = os.path.expanduser('~/Downloads')
if not os.path.exists(work_dir):
os.makedirs(work_dir)
work_dir = os.path.expanduser('~/Downloads')
if not os.path.exists(work_dir):
os.makedirs(work_dir)
In [10]:
Copied!
wbt.set_working_dir(work_dir)
wbt.verbose = True
wbt.set_working_dir(work_dir)
wbt.verbose = True
In [11]:
Copied!
wbt.feature_preserving_smoothing(in_dem, "smoothed.tif", filter=9)
wbt.feature_preserving_smoothing(in_dem, "smoothed.tif", filter=9)
.\whitebox_tools.exe --run="FeaturePreservingSmoothing" --wd="C:\Users\Sarath_Kin\Downloads" --dem='C:\Users\Sarath_Kin\miniconda3\envs\demo311\Lib\site-packages\whitebox\testdata\DEM.tif' --output='smoothed.tif' --filter=9 --norm_diff=15.0 --num_iter=3 --max_diff=0.5 -v --compress_rasters=False
*****************************************
* Welcome to FeaturePreservingSmoothing *
* Powered by WhiteboxTools *
* www.whiteboxgeo.com *
*****************************************
Reading data...
Calculating normal vectors: 0%
Calculating normal vectors: 1%
Calculating normal vectors: 2%
Calculating normal vectors: 3%
Calculating normal vectors: 4%
Calculating normal vectors: 5%
Calculating normal vectors: 6%
Calculating normal vectors: 7%
Calculating normal vectors: 8%
Calculating normal vectors: 9%
Calculating normal vectors: 10%
Calculating normal vectors: 11%
Calculating normal vectors: 12%
Calculating normal vectors: 13%
Calculating normal vectors: 14%
Calculating normal vectors: 15%
Calculating normal vectors: 16%
Calculating normal vectors: 17%
Calculating normal vectors: 18%
Calculating normal vectors: 19%
Calculating normal vectors: 20%
Calculating normal vectors: 21%
Calculating normal vectors: 22%
Calculating normal vectors: 23%
Calculating normal vectors: 24%
Calculating normal vectors: 25%
Calculating normal vectors: 26%
Calculating normal vectors: 27%
Calculating normal vectors: 28%
Calculating normal vectors: 29%
Calculating normal vectors: 30%
Calculating normal vectors: 31%
Calculating normal vectors: 32%
Calculating normal vectors: 33%
Calculating normal vectors: 34%
Calculating normal vectors: 35%
Calculating normal vectors: 36%
Calculating normal vectors: 37%
Calculating normal vectors: 38%
Calculating normal vectors: 39%
Calculating normal vectors: 40%
Calculating normal vectors: 41%
Calculating normal vectors: 42%
Calculating normal vectors: 43%
Calculating normal vectors: 44%
Calculating normal vectors: 45%
Calculating normal vectors: 46%
Calculating normal vectors: 47%
Calculating normal vectors: 48%
Calculating normal vectors: 49%
Calculating normal vectors: 50%
Calculating normal vectors: 51%
Calculating normal vectors: 52%
Calculating normal vectors: 53%
Calculating normal vectors: 54%
Calculating normal vectors: 55%
Calculating normal vectors: 56%
Calculating normal vectors: 57%
Calculating normal vectors: 58%
Calculating normal vectors: 59%
Calculating normal vectors: 60%
Calculating normal vectors: 61%
Calculating normal vectors: 62%
Calculating normal vectors: 63%
Calculating normal vectors: 64%
Calculating normal vectors: 65%
Calculating normal vectors: 66%
Calculating normal vectors: 67%
Calculating normal vectors: 68%
Calculating normal vectors: 69%
Calculating normal vectors: 70%
Calculating normal vectors: 71%
Calculating normal vectors: 72%
Calculating normal vectors: 73%
Calculating normal vectors: 74%
Calculating normal vectors: 75%
Calculating normal vectors: 76%
Calculating normal vectors: 77%
Calculating normal vectors: 78%
Calculating normal vectors: 79%
Calculating normal vectors: 80%
Calculating normal vectors: 81%
Calculating normal vectors: 82%
Calculating normal vectors: 83%
Calculating normal vectors: 84%
Calculating normal vectors: 85%
Calculating normal vectors: 86%
Calculating normal vectors: 87%
Calculating normal vectors: 88%
Calculating normal vectors: 89%
Calculating normal vectors: 90%
Calculating normal vectors: 91%
Calculating normal vectors: 92%
Calculating normal vectors: 93%
Calculating normal vectors: 94%
Calculating normal vectors: 95%
Calculating normal vectors: 96%
Calculating normal vectors: 97%
Calculating normal vectors: 98%
Calculating normal vectors: 99%
Calculating normal vectors: 100%
Calculating normal vectors: 0.2s
Smoothing normal vectors: 0%
Smoothing normal vectors: 1%
Smoothing normal vectors: 2%
Smoothing normal vectors: 3%
Smoothing normal vectors: 4%
Smoothing normal vectors: 5%
Smoothing normal vectors: 6%
Smoothing normal vectors: 7%
Smoothing normal vectors: 8%
Smoothing normal vectors: 9%
Smoothing normal vectors: 10%
Smoothing normal vectors: 11%
Smoothing normal vectors: 12%
Smoothing normal vectors: 13%
Smoothing normal vectors: 14%
Smoothing normal vectors: 15%
Smoothing normal vectors: 16%
Smoothing normal vectors: 17%
Smoothing normal vectors: 18%
Smoothing normal vectors: 19%
Smoothing normal vectors: 20%
Smoothing normal vectors: 21%
Smoothing normal vectors: 22%
Smoothing normal vectors: 23%
Smoothing normal vectors: 24%
Smoothing normal vectors: 25%
Smoothing normal vectors: 26%
Smoothing normal vectors: 27%
Smoothing normal vectors: 28%
Smoothing normal vectors: 29%
Smoothing normal vectors: 30%
Smoothing normal vectors: 31%
Smoothing normal vectors: 32%
Smoothing normal vectors: 33%
Smoothing normal vectors: 34%
Smoothing normal vectors: 35%
Smoothing normal vectors: 36%
Smoothing normal vectors: 37%
Smoothing normal vectors: 38%
Smoothing normal vectors: 39%
Smoothing normal vectors: 40%
Smoothing normal vectors: 41%
Smoothing normal vectors: 42%
Smoothing normal vectors: 43%
Smoothing normal vectors: 44%
Smoothing normal vectors: 45%
Smoothing normal vectors: 46%
Smoothing normal vectors: 47%
Smoothing normal vectors: 48%
Smoothing normal vectors: 49%
Smoothing normal vectors: 50%
Smoothing normal vectors: 51%
Smoothing normal vectors: 52%
Smoothing normal vectors: 53%
Smoothing normal vectors: 54%
Smoothing normal vectors: 55%
Smoothing normal vectors: 56%
Smoothing normal vectors: 57%
Smoothing normal vectors: 58%
Smoothing normal vectors: 59%
Smoothing normal vectors: 60%
Smoothing normal vectors: 61%
Smoothing normal vectors: 62%
Smoothing normal vectors: 63%
Smoothing normal vectors: 64%
Smoothing normal vectors: 65%
Smoothing normal vectors: 66%
Smoothing normal vectors: 67%
Smoothing normal vectors: 68%
Smoothing normal vectors: 69%
Smoothing normal vectors: 70%
Smoothing normal vectors: 71%
Smoothing normal vectors: 72%
Smoothing normal vectors: 73%
Smoothing normal vectors: 74%
Smoothing normal vectors: 75%
Smoothing normal vectors: 76%
Smoothing normal vectors: 77%
Smoothing normal vectors: 78%
Smoothing normal vectors: 79%
Smoothing normal vectors: 80%
Smoothing normal vectors: 81%
Smoothing normal vectors: 82%
Smoothing normal vectors: 83%
Smoothing normal vectors: 84%
Smoothing normal vectors: 85%
Smoothing normal vectors: 86%
Smoothing normal vectors: 87%
Smoothing normal vectors: 88%
Smoothing normal vectors: 89%
Smoothing normal vectors: 90%
Smoothing normal vectors: 91%
Smoothing normal vectors: 92%
Smoothing normal vectors: 93%
Smoothing normal vectors: 94%
Smoothing normal vectors: 95%
Smoothing normal vectors: 96%
Smoothing normal vectors: 97%
Smoothing normal vectors: 98%
Smoothing normal vectors: 99%
Smoothing normal vectors: 100%
Smoothing normal vectors: 0.9s
Updating elevations...
Iteration 1 of 3...
Updating DEM elevations (Loop 1 of 3): 0%
Updating DEM elevations (Loop 1 of 3): 1%
Updating DEM elevations (Loop 1 of 3): 2%
Updating DEM elevations (Loop 1 of 3): 3%
Updating DEM elevations (Loop 1 of 3): 4%
Updating DEM elevations (Loop 1 of 3): 5%
Updating DEM elevations (Loop 1 of 3): 6%
Updating DEM elevations (Loop 1 of 3): 7%
Updating DEM elevations (Loop 1 of 3): 8%
Updating DEM elevations (Loop 1 of 3): 9%
Updating DEM elevations (Loop 1 of 3): 10%
Updating DEM elevations (Loop 1 of 3): 11%
Updating DEM elevations (Loop 1 of 3): 12%
Updating DEM elevations (Loop 1 of 3): 13%
Updating DEM elevations (Loop 1 of 3): 14%
Updating DEM elevations (Loop 1 of 3): 15%
Updating DEM elevations (Loop 1 of 3): 16%
Updating DEM elevations (Loop 1 of 3): 17%
Updating DEM elevations (Loop 1 of 3): 18%
Updating DEM elevations (Loop 1 of 3): 19%
Updating DEM elevations (Loop 1 of 3): 20%
Updating DEM elevations (Loop 1 of 3): 21%
Updating DEM elevations (Loop 1 of 3): 22%
Updating DEM elevations (Loop 1 of 3): 23%
Updating DEM elevations (Loop 1 of 3): 24%
Updating DEM elevations (Loop 1 of 3): 25%
Updating DEM elevations (Loop 1 of 3): 26%
Updating DEM elevations (Loop 1 of 3): 27%
Updating DEM elevations (Loop 1 of 3): 28%
Updating DEM elevations (Loop 1 of 3): 29%
Updating DEM elevations (Loop 1 of 3): 30%
Updating DEM elevations (Loop 1 of 3): 31%
Updating DEM elevations (Loop 1 of 3): 32%
Updating DEM elevations (Loop 1 of 3): 33%
Updating DEM elevations (Loop 1 of 3): 34%
Updating DEM elevations (Loop 1 of 3): 35%
Updating DEM elevations (Loop 1 of 3): 36%
Updating DEM elevations (Loop 1 of 3): 37%
Updating DEM elevations (Loop 1 of 3): 38%
Updating DEM elevations (Loop 1 of 3): 39%
Updating DEM elevations (Loop 1 of 3): 40%
Updating DEM elevations (Loop 1 of 3): 41%
Updating DEM elevations (Loop 1 of 3): 42%
Updating DEM elevations (Loop 1 of 3): 43%
Updating DEM elevations (Loop 1 of 3): 44%
Updating DEM elevations (Loop 1 of 3): 45%
Updating DEM elevations (Loop 1 of 3): 46%
Updating DEM elevations (Loop 1 of 3): 47%
Updating DEM elevations (Loop 1 of 3): 48%
Updating DEM elevations (Loop 1 of 3): 49%
Updating DEM elevations (Loop 1 of 3): 50%
Updating DEM elevations (Loop 1 of 3): 51%
Updating DEM elevations (Loop 1 of 3): 52%
Updating DEM elevations (Loop 1 of 3): 53%
Updating DEM elevations (Loop 1 of 3): 54%
Updating DEM elevations (Loop 1 of 3): 55%
Updating DEM elevations (Loop 1 of 3): 56%
Updating DEM elevations (Loop 1 of 3): 57%
Updating DEM elevations (Loop 1 of 3): 58%
Updating DEM elevations (Loop 1 of 3): 59%
Updating DEM elevations (Loop 1 of 3): 60%
Updating DEM elevations (Loop 1 of 3): 61%
Updating DEM elevations (Loop 1 of 3): 62%
Updating DEM elevations (Loop 1 of 3): 63%
Updating DEM elevations (Loop 1 of 3): 64%
Updating DEM elevations (Loop 1 of 3): 65%
Updating DEM elevations (Loop 1 of 3): 66%
Updating DEM elevations (Loop 1 of 3): 67%
Updating DEM elevations (Loop 1 of 3): 68%
Updating DEM elevations (Loop 1 of 3): 69%
Updating DEM elevations (Loop 1 of 3): 70%
Updating DEM elevations (Loop 1 of 3): 71%
Updating DEM elevations (Loop 1 of 3): 72%
Updating DEM elevations (Loop 1 of 3): 73%
Updating DEM elevations (Loop 1 of 3): 74%
Updating DEM elevations (Loop 1 of 3): 75%
Updating DEM elevations (Loop 1 of 3): 76%
Updating DEM elevations (Loop 1 of 3): 77%
Updating DEM elevations (Loop 1 of 3): 78%
Updating DEM elevations (Loop 1 of 3): 79%
Updating DEM elevations (Loop 1 of 3): 80%
Updating DEM elevations (Loop 1 of 3): 81%
Updating DEM elevations (Loop 1 of 3): 82%
Updating DEM elevations (Loop 1 of 3): 83%
Updating DEM elevations (Loop 1 of 3): 84%
Updating DEM elevations (Loop 1 of 3): 85%
Updating DEM elevations (Loop 1 of 3): 86%
Updating DEM elevations (Loop 1 of 3): 87%
Updating DEM elevations (Loop 1 of 3): 88%
Updating DEM elevations (Loop 1 of 3): 89%
Updating DEM elevations (Loop 1 of 3): 90%
Updating DEM elevations (Loop 1 of 3): 91%
Updating DEM elevations (Loop 1 of 3): 92%
Updating DEM elevations (Loop 1 of 3): 93%
Updating DEM elevations (Loop 1 of 3): 94%
Updating DEM elevations (Loop 1 of 3): 95%
Updating DEM elevations (Loop 1 of 3): 96%
Updating DEM elevations (Loop 1 of 3): 97%
Updating DEM elevations (Loop 1 of 3): 98%
Updating DEM elevations (Loop 1 of 3): 99%
Updating DEM elevations (Loop 1 of 3): 100%
Iteration 2 of 3...
Updating DEM elevations (Loop 2 of 3): 0%
Updating DEM elevations (Loop 2 of 3): 1%
Updating DEM elevations (Loop 2 of 3): 2%
Updating DEM elevations (Loop 2 of 3): 3%
Updating DEM elevations (Loop 2 of 3): 4%
Updating DEM elevations (Loop 2 of 3): 5%
Updating DEM elevations (Loop 2 of 3): 6%
Updating DEM elevations (Loop 2 of 3): 7%
Updating DEM elevations (Loop 2 of 3): 8%
Updating DEM elevations (Loop 2 of 3): 9%
Updating DEM elevations (Loop 2 of 3): 10%
Updating DEM elevations (Loop 2 of 3): 11%
Updating DEM elevations (Loop 2 of 3): 12%
Updating DEM elevations (Loop 2 of 3): 13%
Updating DEM elevations (Loop 2 of 3): 14%
Updating DEM elevations (Loop 2 of 3): 15%
Updating DEM elevations (Loop 2 of 3): 16%
Updating DEM elevations (Loop 2 of 3): 17%
Updating DEM elevations (Loop 2 of 3): 18%
Updating DEM elevations (Loop 2 of 3): 19%
Updating DEM elevations (Loop 2 of 3): 20%
Updating DEM elevations (Loop 2 of 3): 21%
Updating DEM elevations (Loop 2 of 3): 22%
Updating DEM elevations (Loop 2 of 3): 23%
Updating DEM elevations (Loop 2 of 3): 24%
Updating DEM elevations (Loop 2 of 3): 25%
Updating DEM elevations (Loop 2 of 3): 26%
Updating DEM elevations (Loop 2 of 3): 27%
Updating DEM elevations (Loop 2 of 3): 28%
Updating DEM elevations (Loop 2 of 3): 29%
Updating DEM elevations (Loop 2 of 3): 30%
Updating DEM elevations (Loop 2 of 3): 31%
Updating DEM elevations (Loop 2 of 3): 32%
Updating DEM elevations (Loop 2 of 3): 33%
Updating DEM elevations (Loop 2 of 3): 34%
Updating DEM elevations (Loop 2 of 3): 35%
Updating DEM elevations (Loop 2 of 3): 36%
Updating DEM elevations (Loop 2 of 3): 37%
Updating DEM elevations (Loop 2 of 3): 38%
Updating DEM elevations (Loop 2 of 3): 39%
Updating DEM elevations (Loop 2 of 3): 40%
Updating DEM elevations (Loop 2 of 3): 41%
Updating DEM elevations (Loop 2 of 3): 42%
Updating DEM elevations (Loop 2 of 3): 43%
Updating DEM elevations (Loop 2 of 3): 44%
Updating DEM elevations (Loop 2 of 3): 45%
Updating DEM elevations (Loop 2 of 3): 46%
Updating DEM elevations (Loop 2 of 3): 47%
Updating DEM elevations (Loop 2 of 3): 48%
Updating DEM elevations (Loop 2 of 3): 49%
Updating DEM elevations (Loop 2 of 3): 50%
Updating DEM elevations (Loop 2 of 3): 51%
Updating DEM elevations (Loop 2 of 3): 52%
Updating DEM elevations (Loop 2 of 3): 53%
Updating DEM elevations (Loop 2 of 3): 54%
Updating DEM elevations (Loop 2 of 3): 55%
Updating DEM elevations (Loop 2 of 3): 56%
Updating DEM elevations (Loop 2 of 3): 57%
Updating DEM elevations (Loop 2 of 3): 58%
Updating DEM elevations (Loop 2 of 3): 59%
Updating DEM elevations (Loop 2 of 3): 60%
Updating DEM elevations (Loop 2 of 3): 61%
Updating DEM elevations (Loop 2 of 3): 62%
Updating DEM elevations (Loop 2 of 3): 63%
Updating DEM elevations (Loop 2 of 3): 64%
Updating DEM elevations (Loop 2 of 3): 65%
Updating DEM elevations (Loop 2 of 3): 66%
Updating DEM elevations (Loop 2 of 3): 67%
Updating DEM elevations (Loop 2 of 3): 68%
Updating DEM elevations (Loop 2 of 3): 69%
Updating DEM elevations (Loop 2 of 3): 70%
Updating DEM elevations (Loop 2 of 3): 71%
Updating DEM elevations (Loop 2 of 3): 72%
Updating DEM elevations (Loop 2 of 3): 73%
Updating DEM elevations (Loop 2 of 3): 74%
Updating DEM elevations (Loop 2 of 3): 75%
Updating DEM elevations (Loop 2 of 3): 76%
Updating DEM elevations (Loop 2 of 3): 77%
Updating DEM elevations (Loop 2 of 3): 78%
Updating DEM elevations (Loop 2 of 3): 79%
Updating DEM elevations (Loop 2 of 3): 80%
Updating DEM elevations (Loop 2 of 3): 81%
Updating DEM elevations (Loop 2 of 3): 82%
Updating DEM elevations (Loop 2 of 3): 83%
Updating DEM elevations (Loop 2 of 3): 84%
Updating DEM elevations (Loop 2 of 3): 85%
Updating DEM elevations (Loop 2 of 3): 86%
Updating DEM elevations (Loop 2 of 3): 87%
Updating DEM elevations (Loop 2 of 3): 88%
Updating DEM elevations (Loop 2 of 3): 89%
Updating DEM elevations (Loop 2 of 3): 90%
Updating DEM elevations (Loop 2 of 3): 91%
Updating DEM elevations (Loop 2 of 3): 92%
Updating DEM elevations (Loop 2 of 3): 93%
Updating DEM elevations (Loop 2 of 3): 94%
Updating DEM elevations (Loop 2 of 3): 95%
Updating DEM elevations (Loop 2 of 3): 96%
Updating DEM elevations (Loop 2 of 3): 97%
Updating DEM elevations (Loop 2 of 3): 98%
Updating DEM elevations (Loop 2 of 3): 99%
Updating DEM elevations (Loop 2 of 3): 100%
Iteration 3 of 3...
Updating DEM elevations (Loop 3 of 3): 0%
Updating DEM elevations (Loop 3 of 3): 1%
Updating DEM elevations (Loop 3 of 3): 2%
Updating DEM elevations (Loop 3 of 3): 3%
Updating DEM elevations (Loop 3 of 3): 4%
Updating DEM elevations (Loop 3 of 3): 5%
Updating DEM elevations (Loop 3 of 3): 6%
Updating DEM elevations (Loop 3 of 3): 7%
Updating DEM elevations (Loop 3 of 3): 8%
Updating DEM elevations (Loop 3 of 3): 9%
Updating DEM elevations (Loop 3 of 3): 10%
Updating DEM elevations (Loop 3 of 3): 11%
Updating DEM elevations (Loop 3 of 3): 12%
Updating DEM elevations (Loop 3 of 3): 13%
Updating DEM elevations (Loop 3 of 3): 14%
Updating DEM elevations (Loop 3 of 3): 15%
Updating DEM elevations (Loop 3 of 3): 16%
Updating DEM elevations (Loop 3 of 3): 17%
Updating DEM elevations (Loop 3 of 3): 18%
Updating DEM elevations (Loop 3 of 3): 19%
Updating DEM elevations (Loop 3 of 3): 20%
Updating DEM elevations (Loop 3 of 3): 21%
Updating DEM elevations (Loop 3 of 3): 22%
Updating DEM elevations (Loop 3 of 3): 23%
Updating DEM elevations (Loop 3 of 3): 24%
Updating DEM elevations (Loop 3 of 3): 25%
Updating DEM elevations (Loop 3 of 3): 26%
Updating DEM elevations (Loop 3 of 3): 27%
Updating DEM elevations (Loop 3 of 3): 28%
Updating DEM elevations (Loop 3 of 3): 29%
Updating DEM elevations (Loop 3 of 3): 30%
Updating DEM elevations (Loop 3 of 3): 31%
Updating DEM elevations (Loop 3 of 3): 32%
Updating DEM elevations (Loop 3 of 3): 33%
Updating DEM elevations (Loop 3 of 3): 34%
Updating DEM elevations (Loop 3 of 3): 35%
Updating DEM elevations (Loop 3 of 3): 36%
Updating DEM elevations (Loop 3 of 3): 37%
Updating DEM elevations (Loop 3 of 3): 38%
Updating DEM elevations (Loop 3 of 3): 39%
Updating DEM elevations (Loop 3 of 3): 40%
Updating DEM elevations (Loop 3 of 3): 41%
Updating DEM elevations (Loop 3 of 3): 42%
Updating DEM elevations (Loop 3 of 3): 43%
Updating DEM elevations (Loop 3 of 3): 44%
Updating DEM elevations (Loop 3 of 3): 45%
Updating DEM elevations (Loop 3 of 3): 46%
Updating DEM elevations (Loop 3 of 3): 47%
Updating DEM elevations (Loop 3 of 3): 48%
Updating DEM elevations (Loop 3 of 3): 49%
Updating DEM elevations (Loop 3 of 3): 50%
Updating DEM elevations (Loop 3 of 3): 51%
Updating DEM elevations (Loop 3 of 3): 52%
Updating DEM elevations (Loop 3 of 3): 53%
Updating DEM elevations (Loop 3 of 3): 54%
Updating DEM elevations (Loop 3 of 3): 55%
Updating DEM elevations (Loop 3 of 3): 56%
Updating DEM elevations (Loop 3 of 3): 57%
Updating DEM elevations (Loop 3 of 3): 58%
Updating DEM elevations (Loop 3 of 3): 59%
Updating DEM elevations (Loop 3 of 3): 60%
Updating DEM elevations (Loop 3 of 3): 61%
Updating DEM elevations (Loop 3 of 3): 62%
Updating DEM elevations (Loop 3 of 3): 63%
Updating DEM elevations (Loop 3 of 3): 64%
Updating DEM elevations (Loop 3 of 3): 65%
Updating DEM elevations (Loop 3 of 3): 66%
Updating DEM elevations (Loop 3 of 3): 67%
Updating DEM elevations (Loop 3 of 3): 68%
Updating DEM elevations (Loop 3 of 3): 69%
Updating DEM elevations (Loop 3 of 3): 70%
Updating DEM elevations (Loop 3 of 3): 71%
Updating DEM elevations (Loop 3 of 3): 72%
Updating DEM elevations (Loop 3 of 3): 73%
Updating DEM elevations (Loop 3 of 3): 74%
Updating DEM elevations (Loop 3 of 3): 75%
Updating DEM elevations (Loop 3 of 3): 76%
Updating DEM elevations (Loop 3 of 3): 77%
Updating DEM elevations (Loop 3 of 3): 78%
Updating DEM elevations (Loop 3 of 3): 79%
Updating DEM elevations (Loop 3 of 3): 80%
Updating DEM elevations (Loop 3 of 3): 81%
Updating DEM elevations (Loop 3 of 3): 82%
Updating DEM elevations (Loop 3 of 3): 83%
Updating DEM elevations (Loop 3 of 3): 84%
Updating DEM elevations (Loop 3 of 3): 85%
Updating DEM elevations (Loop 3 of 3): 86%
Updating DEM elevations (Loop 3 of 3): 87%
Updating DEM elevations (Loop 3 of 3): 88%
Updating DEM elevations (Loop 3 of 3): 89%
Updating DEM elevations (Loop 3 of 3): 90%
Updating DEM elevations (Loop 3 of 3): 91%
Updating DEM elevations (Loop 3 of 3): 92%
Updating DEM elevations (Loop 3 of 3): 93%
Updating DEM elevations (Loop 3 of 3): 94%
Updating DEM elevations (Loop 3 of 3): 95%
Updating DEM elevations (Loop 3 of 3): 96%
Updating DEM elevations (Loop 3 of 3): 97%
Updating DEM elevations (Loop 3 of 3): 98%
Updating DEM elevations (Loop 3 of 3): 99%
Updating DEM elevations (Loop 3 of 3): 100%
Saving data...
Output file written
Elapsed Time (excluding I/O): 0.276s
Out[11]:
0
In [12]:
Copied!
wbt.breach_depressions("smoothed.tif", "breached.tif")
wbt.breach_depressions("smoothed.tif", "breached.tif")
.\whitebox_tools.exe --run="BreachDepressions" --wd="C:\Users\Sarath_Kin\Downloads" --dem='smoothed.tif' --output='breached.tif' -v --compress_rasters=False
********************************
* Welcome to BreachDepressions *
* Powered by WhiteboxTools *
* www.whiteboxgeo.com *
********************************
Reading data...
Progress: 0%
Progress: 1%
Progress: 2%
Progress: 3%
Progress: 4%
Progress: 5%
Progress: 6%
Progress: 7%
Progress: 8%
Progress: 9%
Progress: 10%
Progress: 11%
Progress: 12%
Progress: 13%
Progress: 14%
Progress: 15%
Progress: 16%
Progress: 17%
Progress: 18%
Progress: 19%
Progress: 20%
Progress: 21%
Progress: 22%
Progress: 23%
Progress: 24%
Progress: 25%
Progress: 26%
Progress: 27%
Progress: 28%
Progress: 29%
Progress: 30%
Progress: 31%
Progress: 32%
Progress: 33%
Progress: 34%
Progress: 35%
Progress: 36%
Progress: 37%
Progress: 38%
Progress: 39%
Progress: 40%
Progress: 41%
Progress: 42%
Progress: 43%
Progress: 44%
Progress: 45%
Progress: 46%
Progress: 47%
Progress: 48%
Progress: 49%
Progress: 50%
Progress: 51%
Progress: 52%
Progress: 53%
Progress: 54%
Progress: 55%
Progress: 56%
Progress: 57%
Progress: 58%
Progress: 59%
Progress: 60%
Progress: 61%
Progress: 62%
Progress: 63%
Progress: 64%
Progress: 65%
Progress: 66%
Progress: 67%
Progress: 68%
Progress: 69%
Progress: 70%
Progress: 71%
Progress: 72%
Progress: 73%
Progress: 74%
Progress: 75%
Progress: 76%
Progress: 77%
Progress: 78%
Progress: 79%
Progress: 80%
Progress: 81%
Progress: 82%
Progress: 83%
Progress: 84%
Progress: 85%
Progress: 86%
Progress: 87%
Progress: 88%
Progress: 89%
Progress: 90%
Progress: 91%
Progress: 92%
Progress: 93%
Progress: 94%
Progress: 95%
Progress: 96%
Progress: 97%
Progress: 98%
Progress: 99%
Progress: 100%
Progress: 101%
Saving data...
Output file written
Elapsed Time (excluding I/O): 0.7s
Out[12]:
0
In [13]:
Copied!
wbt.d_inf_flow_accumulation("breached.tif", "flow_accum.tif")
wbt.d_inf_flow_accumulation("breached.tif", "flow_accum.tif")
.\whitebox_tools.exe --run="DInfFlowAccumulation" --wd="C:\Users\Sarath_Kin\Downloads" --input='breached.tif' --output='flow_accum.tif' --out_type=Specific Contributing Area -v --compress_rasters=False
***********************************
* Welcome to DInfFlowAccumulation *
* Powered by WhiteboxTools *
* www.whiteboxgeo.com *
***********************************
Reading data...
Flow directions: 0%
Flow directions: 1%
Flow directions: 2%
Flow directions: 3%
Flow directions: 4%
Flow directions: 5%
Flow directions: 6%
Flow directions: 7%
Flow directions: 8%
Flow directions: 9%
Flow directions: 10%
Flow directions: 11%
Flow directions: 12%
Flow directions: 13%
Flow directions: 14%
Flow directions: 15%
Flow directions: 16%
Flow directions: 17%
Flow directions: 18%
Flow directions: 19%
Flow directions: 20%
Flow directions: 21%
Flow directions: 22%
Flow directions: 23%
Flow directions: 24%
Flow directions: 25%
Flow directions: 26%
Flow directions: 27%
Flow directions: 28%
Flow directions: 29%
Flow directions: 30%
Flow directions: 31%
Flow directions: 32%
Flow directions: 33%
Flow directions: 34%
Flow directions: 35%
Flow directions: 36%
Flow directions: 37%
Flow directions: 38%
Flow directions: 39%
Flow directions: 40%
Flow directions: 41%
Flow directions: 42%
Flow directions: 43%
Flow directions: 44%
Flow directions: 45%
Flow directions: 46%
Flow directions: 47%
Flow directions: 48%
Flow directions: 49%
Flow directions: 50%
Flow directions: 51%
Flow directions: 52%
Flow directions: 53%
Flow directions: 54%
Flow directions: 55%
Flow directions: 56%
Flow directions: 57%
Flow directions: 58%
Flow directions: 59%
Flow directions: 60%
Flow directions: 61%
Flow directions: 62%
Flow directions: 63%
Flow directions: 64%
Flow directions: 65%
Flow directions: 66%
Flow directions: 67%
Flow directions: 68%
Flow directions: 69%
Flow directions: 70%
Flow directions: 71%
Flow directions: 72%
Flow directions: 73%
Flow directions: 74%
Flow directions: 75%
Flow directions: 76%
Flow directions: 77%
Flow directions: 78%
Flow directions: 79%
Flow directions: 80%
Flow directions: 81%
Flow directions: 82%
Flow directions: 83%
Flow directions: 84%
Flow directions: 85%
Flow directions: 86%
Flow directions: 87%
Flow directions: 88%
Flow directions: 89%
Flow directions: 90%
Flow directions: 91%
Flow directions: 92%
Flow directions: 93%
Flow directions: 94%
Flow directions: 95%
Flow directions: 96%
Flow directions: 97%
Flow directions: 98%
Flow directions: 99%
Flow directions: 100%
Num. inflowing neighbours: 0%
Num. inflowing neighbours: 1%
Num. inflowing neighbours: 2%
Num. inflowing neighbours: 3%
Num. inflowing neighbours: 4%
Num. inflowing neighbours: 5%
Num. inflowing neighbours: 6%
Num. inflowing neighbours: 7%
Num. inflowing neighbours: 8%
Num. inflowing neighbours: 9%
Num. inflowing neighbours: 10%
Num. inflowing neighbours: 11%
Num. inflowing neighbours: 12%
Num. inflowing neighbours: 13%
Num. inflowing neighbours: 14%
Num. inflowing neighbours: 15%
Num. inflowing neighbours: 16%
Num. inflowing neighbours: 17%
Num. inflowing neighbours: 18%
Num. inflowing neighbours: 19%
Num. inflowing neighbours: 20%
Num. inflowing neighbours: 21%
Num. inflowing neighbours: 22%
Num. inflowing neighbours: 23%
Num. inflowing neighbours: 24%
Num. inflowing neighbours: 25%
Num. inflowing neighbours: 26%
Num. inflowing neighbours: 27%
Num. inflowing neighbours: 28%
Num. inflowing neighbours: 29%
Num. inflowing neighbours: 30%
Num. inflowing neighbours: 31%
Num. inflowing neighbours: 32%
Num. inflowing neighbours: 33%
Num. inflowing neighbours: 34%
Num. inflowing neighbours: 35%
Num. inflowing neighbours: 36%
Num. inflowing neighbours: 37%
Num. inflowing neighbours: 38%
Num. inflowing neighbours: 39%
Num. inflowing neighbours: 40%
Num. inflowing neighbours: 41%
Num. inflowing neighbours: 42%
Num. inflowing neighbours: 43%
Num. inflowing neighbours: 44%
Num. inflowing neighbours: 45%
Num. inflowing neighbours: 46%
Num. inflowing neighbours: 47%
Num. inflowing neighbours: 48%
Num. inflowing neighbours: 49%
Num. inflowing neighbours: 50%
Num. inflowing neighbours: 51%
Num. inflowing neighbours: 52%
Num. inflowing neighbours: 53%
Num. inflowing neighbours: 54%
Num. inflowing neighbours: 55%
Num. inflowing neighbours: 56%
Num. inflowing neighbours: 57%
Num. inflowing neighbours: 58%
Num. inflowing neighbours: 59%
Num. inflowing neighbours: 60%
Num. inflowing neighbours: 61%
Num. inflowing neighbours: 62%
Num. inflowing neighbours: 63%
Num. inflowing neighbours: 64%
Num. inflowing neighbours: 65%
Num. inflowing neighbours: 66%
Num. inflowing neighbours: 67%
Num. inflowing neighbours: 68%
Num. inflowing neighbours: 69%
Num. inflowing neighbours: 70%
Num. inflowing neighbours: 71%
Num. inflowing neighbours: 72%
Num. inflowing neighbours: 73%
Num. inflowing neighbours: 74%
Num. inflowing neighbours: 75%
Num. inflowing neighbours: 76%
Num. inflowing neighbours: 77%
Num. inflowing neighbours: 78%
Num. inflowing neighbours: 79%
Num. inflowing neighbours: 80%
Num. inflowing neighbours: 81%
Num. inflowing neighbours: 82%
Num. inflowing neighbours: 83%
Num. inflowing neighbours: 84%
Num. inflowing neighbours: 85%
Num. inflowing neighbours: 86%
Num. inflowing neighbours: 87%
Num. inflowing neighbours: 88%
Num. inflowing neighbours: 89%
Num. inflowing neighbours: 90%
Num. inflowing neighbours: 91%
Num. inflowing neighbours: 92%
Num. inflowing neighbours: 93%
Num. inflowing neighbours: 94%
Num. inflowing neighbours: 95%
Num. inflowing neighbours: 96%
Num. inflowing neighbours: 97%
Num. inflowing neighbours: 98%
Num. inflowing neighbours: 99%
Num. inflowing neighbours: 100%
Flow accumulation: 0%
Flow accumulation: 1%
Flow accumulation: 2%
Flow accumulation: 3%
Flow accumulation: 4%
Flow accumulation: 5%
Flow accumulation: 6%
Flow accumulation: 7%
Flow accumulation: 8%
Flow accumulation: 9%
Flow accumulation: 10%
Flow accumulation: 11%
Flow accumulation: 12%
Flow accumulation: 13%
Flow accumulation: 14%
Flow accumulation: 15%
Flow accumulation: 16%
Flow accumulation: 17%
Flow accumulation: 18%
Flow accumulation: 19%
Flow accumulation: 20%
Flow accumulation: 21%
Flow accumulation: 22%
Flow accumulation: 23%
Flow accumulation: 24%
Flow accumulation: 25%
Flow accumulation: 26%
Flow accumulation: 27%
Flow accumulation: 28%
Flow accumulation: 29%
Flow accumulation: 30%
Flow accumulation: 31%
Flow accumulation: 32%
Flow accumulation: 33%
Flow accumulation: 34%
Flow accumulation: 35%
Flow accumulation: 36%
Flow accumulation: 37%
Flow accumulation: 38%
Flow accumulation: 39%
Flow accumulation: 40%
Flow accumulation: 41%
Flow accumulation: 42%
Flow accumulation: 43%
Flow accumulation: 44%
Flow accumulation: 45%
Flow accumulation: 46%
Flow accumulation: 47%
Flow accumulation: 48%
Flow accumulation: 49%
Flow accumulation: 50%
Flow accumulation: 51%
Flow accumulation: 52%
Flow accumulation: 53%
Flow accumulation: 54%
Flow accumulation: 55%
Flow accumulation: 56%
Flow accumulation: 57%
Flow accumulation: 58%
Flow accumulation: 59%
Flow accumulation: 60%
Flow accumulation: 61%
Flow accumulation: 62%
Flow accumulation: 63%
Flow accumulation: 64%
Flow accumulation: 65%
Flow accumulation: 66%
Flow accumulation: 67%
Flow accumulation: 68%
Flow accumulation: 69%
Flow accumulation: 70%
Flow accumulation: 71%
Flow accumulation: 72%
Flow accumulation: 73%
Flow accumulation: 74%
Flow accumulation: 75%
Flow accumulation: 76%
Flow accumulation: 77%
Flow accumulation: 78%
Flow accumulation: 79%
Flow accumulation: 80%
Flow accumulation: 81%
Flow accumulation: 82%
Flow accumulation: 83%
Flow accumulation: 84%
Flow accumulation: 85%
Flow accumulation: 86%
Flow accumulation: 87%
Flow accumulation: 88%
Flow accumulation: 89%
Flow accumulation: 90%
Flow accumulation: 91%
Flow accumulation: 92%
Flow accumulation: 93%
Flow accumulation: 94%
Flow accumulation: 95%
Flow accumulation: 96%
Flow accumulation: 97%
Flow accumulation: 98%
Flow accumulation: 99%
Flow accumulation: 100%
Correcting values: 0%
Correcting values: 1%
Correcting values: 2%
Correcting values: 3%
Correcting values: 4%
Correcting values: 5%
Correcting values: 6%
Correcting values: 7%
Correcting values: 8%
Correcting values: 9%
Correcting values: 10%
Correcting values: 11%
Correcting values: 12%
Correcting values: 13%
Correcting values: 14%
Correcting values: 15%
Correcting values: 16%
Correcting values: 17%
Correcting values: 18%
Correcting values: 19%
Correcting values: 20%
Correcting values: 21%
Correcting values: 22%
Correcting values: 23%
Correcting values: 24%
Correcting values: 25%
Correcting values: 26%
Correcting values: 27%
Correcting values: 28%
Correcting values: 29%
Correcting values: 30%
Correcting values: 31%
Correcting values: 32%
Correcting values: 33%
Correcting values: 34%
Correcting values: 35%
Correcting values: 36%
Correcting values: 37%
Correcting values: 38%
Correcting values: 39%
Correcting values: 40%
Correcting values: 41%
Correcting values: 42%
Correcting values: 43%
Correcting values: 44%
Correcting values: 45%
Correcting values: 46%
Correcting values: 47%
Correcting values: 48%
Correcting values: 49%
Correcting values: 50%
Correcting values: 51%
Correcting values: 52%
Correcting values: 53%
Correcting values: 54%
Correcting values: 55%
Correcting values: 56%
Correcting values: 57%
Correcting values: 58%
Correcting values: 59%
Correcting values: 60%
Correcting values: 61%
Correcting values: 62%
Correcting values: 63%
Correcting values: 64%
Correcting values: 65%
Correcting values: 66%
Correcting values: 67%
Correcting values: 68%
Correcting values: 69%
Correcting values: 70%
Correcting values: 71%
Correcting values: 72%
Correcting values: 73%
Correcting values: 74%
Correcting values: 75%
Correcting values: 76%
Correcting values: 77%
Correcting values: 78%
Correcting values: 79%
Correcting values: 80%
Correcting values: 81%
Correcting values: 82%
Correcting values: 83%
Correcting values: 84%
Correcting values: 85%
Correcting values: 86%
Correcting values: 87%
Correcting values: 88%
Correcting values: 89%
Correcting values: 90%
Correcting values: 91%
Correcting values: 92%
Correcting values: 93%
Correcting values: 94%
Correcting values: 95%
Correcting values: 96%
Correcting values: 97%
Correcting values: 98%
Correcting values: 99%
Correcting values: 100%
Saving data...
Output file written
Elapsed Time (excluding I/O): 0.131s
Out[13]:
0
Using whitebox with ipyleaflet¶
In [14]:
Copied!
import geodemo
import whiteboxgui.whiteboxgui as wbt
from ipyleaflet import WidgetControl
import geodemo
import whiteboxgui.whiteboxgui as wbt
from ipyleaflet import WidgetControl
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) Cell In[14], line 1 ----> 1 import geodemo 2 import whiteboxgui.whiteboxgui as wbt 3 from ipyleaflet import WidgetControl ModuleNotFoundError: No module named 'geodemo'
In [15]:
Copied!
m = geodemo.Map()
m
m = geodemo.Map()
m
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Cell In[15], line 1 ----> 1 m = geodemo.Map() 2 m NameError: name 'geodemo' is not defined
In [16]:
Copied!
tools_dict = wbt.get_wbt_dict()
wbt_toolbox = wbt.build_toolbox(
tools_dict, max_width="800px", max_height="500px"
)
wbt_control = WidgetControl(
widget=wbt_toolbox, position="bottomright"
)
m.add_control(wbt_control)
tools_dict = wbt.get_wbt_dict()
wbt_toolbox = wbt.build_toolbox(
tools_dict, max_width="800px", max_height="500px"
)
wbt_control = WidgetControl(
widget=wbt_toolbox, position="bottomright"
)
m.add_control(wbt_control)
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[16], line 1 ----> 1 tools_dict = wbt.get_wbt_dict() 2 wbt_toolbox = wbt.build_toolbox( 3 tools_dict, max_width="800px", max_height="500px" 4 ) 6 wbt_control = WidgetControl( 7 widget=wbt_toolbox, position="bottomright" 8 ) AttributeError: 'WhiteboxTools' object has no attribute 'get_wbt_dict'