Рет қаралды 898
In this video, I show you how to use and interact with the WhiteboxTools Python API. By combining the WhiteboxTools library with a high-level scripting language, such as Python, users are capable of creating powerful stand-alone geospatial applications and workflow automation scripts. In this tutorial, I go over line-by-line how to set up an example python script to call various tools from WhiteboxTools. Although this is one way to call tools from the WhiteboxTools API, many other methods are possible.
Depending on the relative location of the WhiteboxTools directory and the script file that you are importing to, the import statement may need to be altered slightly. In the above script, it is assumed that the folder containing the WhiteboxTools files (including the whitebox_tools Python script) is named "WBT" and that the calling script that is importing WhiteboxTools is located in the parent directory of WBT. See An Example WhiteboxTools Python Project for more details on project set-up (www.whiteboxgeo.com/manual/wb....
The WhiteboxTools class expects to find the WhiteboxTools executable file (whitebox_tools.exe on Windows and whitebox_tools on other platforms) within the same directory (WBT) as the whitebox_tools.py script.
Each tool has a corresponding convenience method. The listing of tools in this manual includes information about each tool's Python convenience method, including default parameter values. Parameters with default values may be optionally left off of function calls. In addition to the convenience methods, tools can be called using the run_tool() method, specifying the tool name and a list of tool arguments.
For more information on the WhiteboxTools API, see the WhiteboxTools User Manual (www.whiteboxgeo.com/manual/wb.... Please put any questions you have down below or visit our Google Group (groups.google.com/u/1/g/white.... Please like this video and subscribe to our KZbin channel for all news and updates. Check out this video and more tutorials on our website (www.whiteboxgeo.com/learning-....