├── .gitignore ├── .pre-commit-config.yaml ├── LICENSE ├── README.md ├── WBT ├── LICENSE.txt ├── PRE │ ├── WhiteboxTools.py │ ├── automation.py │ ├── file_about.py │ ├── file_header.py │ ├── file_tool.py │ ├── file_toolbox.py │ ├── testing.py │ └── whitebox_tools.py ├── UserManual.txt ├── __init__.py ├── img │ ├── WBRunner.png │ ├── WBT_icon.png │ ├── WhiteboxToolsLogo.png │ ├── WhiteboxToolsLogo.svg │ ├── WhiteboxToolsLogoBlue.png │ ├── WhiteboxToolsLogoGreen.png │ ├── WhiteboxToolsLogo_box_only.png │ ├── WhiteboxToolsLogo_box_only.svg │ ├── WhiteboxToolsLogo_vert.svg │ ├── WhiteboxToolsLogo_vert1.png │ ├── WhiteboxToolsLogo_vert2.png │ ├── WhiteboxToolsLogo_vert3.png │ ├── WhiteboxToolsLogo_vert4.png │ ├── closed.gif │ ├── closed.png │ ├── open.gif │ ├── open.png │ ├── tool.gif │ └── tool.png ├── plugins │ ├── conditional_evaluation.exe │ ├── conditional_evaluation.json │ ├── conditioned_latin_hypercube.exe │ ├── conditioned_latin_hypercube.json │ ├── edge_contamination.exe │ ├── edge_contamination.json │ ├── exposure_towards_wind_flux.exe │ ├── exposure_towards_wind_flux.json │ ├── gaussian_scale_space.exe │ ├── gaussian_scale_space.json │ ├── heat_map.exe │ ├── heat_map.json │ ├── individual_tree_detection.exe │ ├── individual_tree_detection.json │ ├── install_wb_extension.exe │ ├── install_wb_extension.json │ ├── launch_wb_runner.exe │ ├── launch_wb_runner.json │ ├── lidar_shift.exe │ ├── lidar_shift.json │ ├── local_quadratic_regression.exe │ ├── local_quadratic_regression.json │ ├── max_upslope_value.exe │ ├── max_upslope_value.json │ ├── normalize_lidar.exe │ ├── normalize_lidar.json │ ├── qin_flow_accumulation.exe │ ├── qin_flow_accumulation.json │ ├── quinn_flow_accumulation.exe │ ├── quinn_flow_accumulation.json │ ├── raster_calculator.exe │ ├── raster_calculator.json │ ├── register_license.exe │ ├── repair_stream_vector_topology.exe │ ├── repair_stream_vector_topology.json │ ├── rho8_flow_accumulation.exe │ ├── rho8_flow_accumulation.json │ ├── split_vector_lines.exe │ ├── split_vector_lines.json │ ├── travelling_salesman_problem.exe │ ├── travelling_salesman_problem.json │ ├── vector_stream_network_analysis.exe │ └── vector_stream_network_analysis.json ├── readme.txt ├── settings.json ├── wb_runner.py ├── whitebox_example.py ├── whitebox_tools.exe └── whitebox_tools.py ├── WhiteboxTools.pyt ├── screenshots ├── ArcGIS-10.6.png ├── Toolbox-1.png ├── Toolbox-2.png ├── Toolbox-3.png ├── Toolbox.png ├── arcgis-10.5.png ├── arcgis-pro-2.png └── arcgis-pro.png └── testdata ├── DEM ├── DEM.dep └── DEM.tif ├── Landsat ├── LC80320272014265LGN00_B1.TIF ├── LC80320272014265LGN00_B2.TIF ├── LC80320272014265LGN00_B3.TIF ├── LC80320272014265LGN00_B4.TIF ├── LC80320272014265LGN00_B5.TIF ├── LC80320272014265LGN00_B6.TIF ├── LC80320272014265LGN00_B7.TIF ├── LC80320272014265LGN00_B8.TIF ├── LC80320272014265LGN00_Boundary.cpg ├── LC80320272014265LGN00_Boundary.dbf ├── LC80320272014265LGN00_Boundary.prj ├── LC80320272014265LGN00_Boundary.shp ├── LC80320272014265LGN00_Boundary.shx └── Readme.txt ├── Wetlands ├── CLSA_Boundary.dbf ├── CLSA_Boundary.prj ├── CLSA_Boundary.shp ├── CLSA_Boundary.shx ├── CLSA_LiDAR_2m.tif ├── CLSA_NAIP_2m.tif ├── CLSA_NED_10m.tif ├── CLSA_Wetland_Points.dbf ├── CLSA_Wetland_Points.prj ├── CLSA_Wetland_Points.sbn ├── CLSA_Wetland_Points.sbx ├── CLSA_Wetland_Points.shp ├── CLSA_Wetland_Points.shx ├── CLSA_Wetland_Polygons.dbf ├── CLSA_Wetland_Polygons.prj ├── CLSA_Wetland_Polygons.sbn ├── CLSA_Wetland_Polygons.sbx ├── CLSA_Wetland_Polygons.shp ├── CLSA_Wetland_Polygons.shx ├── CLSA_Wetland_Polylines.cpg ├── CLSA_Wetland_Polylines.dbf ├── CLSA_Wetland_Polylines.prj ├── CLSA_Wetland_Polylines.sbn ├── CLSA_Wetland_Polylines.sbx ├── CLSA_Wetland_Polylines.shp ├── CLSA_Wetland_Polylines.shx └── Readme.txt ├── WorldMap ├── Readme.txt ├── TM_WORLD_BORDERS_SIMPL-0.3.dbf ├── TM_WORLD_BORDERS_SIMPL-0.3.prj ├── TM_WORLD_BORDERS_SIMPL-0.3.shp └── TM_WORLD_BORDERS_SIMPL-0.3.shx └── examples.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | .idea/ 6 | whitebox/WBT/ 7 | **/*.tar.xz 8 | **/*.xml 9 | **/.access^ 10 | whitebox/testdata/breached.tif 11 | whitebox/testdata/flow_accum.tif 12 | whitebox/testdata/smoothed.tif 13 | whitebox/whitebox_tools 14 | dev/ 15 | .vscode/ 16 | _build/ 17 | temp/ 18 | WhiteboxTools_win_amd64.zip 19 | **/*.db 20 | **/*.db:encryptable 21 | WhiteboxTools.pyt.zip 22 | **/*.lock 23 | **/*.aux.xml 24 | **/*.tfw 25 | **/*.tif.ovr 26 | **/*.CPG 27 | __MACOSX/ 28 | whitebox_tools-v*.exe 29 | WBT/img/._* 30 | 31 | 32 | # C extensions 33 | *.so 34 | 35 | # Distribution / packaging 36 | .Python 37 | env/ 38 | build/ 39 | develop-eggs/ 40 | dist/ 41 | downloads/ 42 | eggs/ 43 | .eggs/ 44 | lib/ 45 | lib64/ 46 | parts/ 47 | sdist/ 48 | var/ 49 | wheels/ 50 | *.egg-info/ 51 | .installed.cfg 52 | *.egg 53 | 54 | # PyInstaller 55 | # Usually these files are written by a python script from a template 56 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 57 | *.manifest 58 | *.spec 59 | 60 | # Installer logs 61 | pip-log.txt 62 | pip-delete-this-directory.txt 63 | 64 | # Unit test / coverage reports 65 | htmlcov/ 66 | .tox/ 67 | .coverage 68 | .coverage.* 69 | .cache 70 | nosetests.xml 71 | coverage.xml 72 | *.cover 73 | .hypothesis/ 74 | .pytest_cache/ 75 | 76 | # Translations 77 | *.mo 78 | *.pot 79 | 80 | # Django stuff: 81 | *.log 82 | local_settings.py 83 | 84 | # Flask stuff: 85 | instance/ 86 | .webassets-cache 87 | 88 | # Scrapy stuff: 89 | .scrapy 90 | 91 | # Sphinx documentation 92 | docs/_build/ 93 | 94 | # PyBuilder 95 | target/ 96 | 97 | # Jupyter Notebook 98 | .ipynb_checkpoints 99 | examples/.ipynb_checkpoints 100 | 101 | # pyenv 102 | .python-version 103 | 104 | # celery beat schedule file 105 | celerybeat-schedule 106 | 107 | # SageMath parsed files 108 | *.sage.py 109 | 110 | # dotenv 111 | .env 112 | 113 | # virtualenv 114 | .venv 115 | venv/ 116 | ENV/ 117 | 118 | # Spyder project settings 119 | .spyderproject 120 | .spyproject 121 | 122 | # Rope project settings 123 | .ropeproject 124 | 125 | # mkdocs documentation 126 | /site 127 | 128 | # mypy 129 | .mypy_cache/ 130 | WBT/img/.DS_Store 131 | WBT/whitebox_runner.exe 132 | WBT/settings.json 133 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: v5.0.0 4 | hooks: 5 | - id: check-toml 6 | - id: check-yaml 7 | # - id: end-of-file-fixer 8 | # types: [python] 9 | # - id: trailing-whitespace 10 | # - id: requirements-txt-fixer 11 | # - id: check-added-large-files 12 | # args: ["--maxkb=500"] 13 | 14 | # - repo: https://github.com/psf/black 15 | # rev: 24.10.0 16 | # hooks: 17 | # - id: black-jupyter 18 | 19 | # - repo: https://github.com/codespell-project/codespell 20 | # rev: v2.3.0 21 | # hooks: 22 | # - id: codespell 23 | # args: 24 | # [ 25 | # "--ignore-words-list=aci,acount,acounts,fallow,ges,hart,hist,nd,ned,ois,wqs,watermask,tre", 26 | # "--skip=*.csv,*.geojson,*.json,*.yml*.js,*.html,*cff,*.pdf", 27 | # ] 28 | 29 | # - repo: https://github.com/kynan/nbstripout 30 | # rev: 0.8.0 31 | # hooks: 32 | # - id: nbstripout 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Qiusheng Wu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WhiteboxTools-ArcGIS 2 | 3 | [![docs](https://img.shields.io/badge/whitebox-docs-brightgreen.svg)](https://www.whiteboxgeo.com/manual/wbt_book/preface.html) 4 | [![ArcGIS](https://img.shields.io/badge/whitebox-ArcGIS-brightgreen.svg)](https://github.com/opengeos/WhiteboxTools-ArcGIS) 5 | [![python](https://img.shields.io/badge/whitebox-Python-blue.svg)](https://github.com/opengeos/whitebox-python) 6 | [![R](https://img.shields.io/badge/whitebox-R-green.svg)](https://github.com/opengeos/whiteboxR) 7 | [![QGIS](https://img.shields.io/badge/whitebox-QGIS-orange.svg)](https://www.whiteboxgeo.com/manual/wbt_book/qgis_plugin.html) 8 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 9 | [![Donate](https://img.shields.io/badge/Donate-Buy%20me%20a%20coffee-yellowgreen.svg)](https://www.buymeacoffee.com/giswqs) 10 | 11 | ArcGIS Python Toolbox for WhiteboxTools. 12 | 13 | This repository is related to the **ArcGIS Python Toolbox for WhiteboxTools**, which is an ArcGIS frontend of a stand-alone executable command-line program called **[WhiteboxTools](https://github.com/jblindsay/whitebox-tools)**. 14 | 15 | ![Note](https://i.imgur.com/Ic8BA7C.png) **Important Note:** This toolbox only supports **ArcGIS Pro and ArcGIS 10.6 or newer**. Don't waste your time trying it on ArcGIS 10.5 or older versions. 16 | 17 | * Authors: John Lindsay () 18 | * Contributors: Qiusheng Wu () 19 | * WhiteboxTools: 20 | * User Manual: 21 | * WhiteboxTools-ArcGIS: 22 | * WhiteboxTools-Python: 23 | * WhiteboxTools-Jupyter: 24 | * WhiteboxTools-R: 25 | * Free software: [MIT license](https://opensource.org/licenses/MIT) 26 | 27 | **Contents** 28 | 29 | - [WhiteboxTools-ArcGIS](#whiteboxtools-arcgis) 30 | - [Description](#description) 31 | - [Installation](#installation) 32 | - [Step 1: Download the toolbox](#step-1-download-the-toolbox) 33 | - [Step 2: Connect to the toolbox](#step-2-connect-to-the-toolbox) 34 | - [Usage](#usage) 35 | - [Tutorials](#tutorials) 36 | - [Available Tools](#available-tools) 37 | - [Supported Data Formats](#supported-data-formats) 38 | - [Contributing](#contributing) 39 | - [License](#license) 40 | - [Reporting Bugs](#reporting-bugs) 41 | - [Toolbox Screenshots](#toolbox-screenshots) 42 | 43 | ## Description 44 | 45 | **WhiteboxTools-ArcGIS** is an ArcGIS Python Toolbox for **WhiteboxTools**, an advanced geospatial data analysis platform developed by Prof. John Lindsay ([webpage](https://jblindsay.github.io/ghrg/index.html); [jblindsay](https://github.com/jblindsay)) at the University of Guelph's [Geomorphometry and Hydrogeomatics Research Group](https://jblindsay.github.io/ghrg/index.html). *WhiteboxTools* can be used to perform common geographical information systems (GIS) analysis operations, such as cost-distance analysis, distance buffering, and raster reclassification. Remote sensing and image processing tasks include image enhancement (e.g. panchromatic sharpening, contrast adjustments), image mosaicing, numerous filtering operations, simple classification (k-means), and common image transformations. *WhiteboxTools* also contains advanced tooling for spatial hydrological analysis (e.g. flow-accumulation, watershed delineation, stream network analysis, sink removal), terrain analysis (e.g. common terrain indices such as slope, curvatures, wetness index, hillshading; hypsometric analysis; multi-scale topographic position analysis), and LiDAR data processing. LiDAR point clouds can be interrogated (LidarInfo, LidarHistogram), segmented, tiled and joined, analyized for outliers, interpolated to rasters (DEMs, intensity images), and ground-points can be classified or filtered. *WhiteboxTools* is not a cartographic or spatial data visualization package; instead it is meant to serve as an analytical backend for other data visualization software, mainly GIS. Suggested citation: Lindsay, J. B. (2016). Whitebox GAT: A case study in geomorphometric analysis. _Computers & Geosciences_, 95, 75-84. doi:[10.1016/j.cageo.2016.07.003](http://dx.doi.org/10.1016/j.cageo.2016.07.003). 46 | 47 | ## Installation 48 | 49 | ### Step 1: Download the toolbox 50 | 51 | 1. Click the green button (**[Clone or download](https://gishub.org/whitebox-arcgis-download)**) on the upper-right corner of this page to download the toolbox as a zip file. 52 | 53 | ![](https://i.imgur.com/2xQkxCY.png) 54 | 55 | 2. Depcompress the downloaded zip file. 56 | 57 | ### Step 2: Connect to the toolbox 58 | 59 | 1. Navigate to the **Folder Connections** node in the catalog window tree. 60 | 61 | 2. Right-click the node and choose **Connect To Folder**. 62 | 63 | ![](https://i.imgur.com/uKK1Yel.png) 64 | 65 | 3. Type the path or navigate to the **WhiteboxTools-ArcGIS** folder and click **OK**. 66 | 67 | 4. Browse into the toolbox and start using its tools. 68 | 69 | ![](https://i.imgur.com/JcdNBnt.png) 70 | 71 | ## Usage 72 | 73 | Open any tool within the toolbox and start using it. Check out the [WhiteboxTools User Mannual](https://www.whiteboxgeo.com/manual/wbt_book/) for more detailed help documentation of each tool. 74 | 75 | ![](https://i.imgur.com/4c9RLZY.png) 76 | 77 | ## Tutorials 78 | 79 | [Introducing WhiteboxTools frontends (Python, Jupyter, ArcGIS, R)](https://youtu.be/cv33vkpwta0) 80 | 81 | [![](https://img.youtube.com/vi/cv33vkpwta0/0.jpg)](https://youtu.be/cv33vkpwta0) 82 | 83 | ## Available Tools 84 | 85 | The **[WhiteboxTools](https://github.com/jblindsay/whitebox-tools)** library currently contains **468** tools, which are each grouped based on their main function into one of the following categories: Data Tools, GIS Analysis, Hydrological Analysis, Image Analysis, LiDAR Analysis, Mathematical and Statistical Analysis, Stream Network Analysis, and Terrain Analysis. For a listing of available tools, complete with documentation and usage details, please see the [WhiteboxTools User Manual](https://www.whiteboxgeo.com/manual/wbt_book/available_tools/index.html). 86 | 87 | ## Supported Data Formats 88 | 89 | The **WhiteboxTools** library can currently support read/writing raster data in [*Whitebox GAT*](http://www.uoguelph.ca/~hydrogeo/Whitebox/), GeoTIFF, ESRI (ArcGIS) ASCII and binary (.flt & .hdr), GRASS GIS, Idrisi, SAGA GIS (binary and ASCII), and Surfer 7 data formats. The library is primarily tested using Whitebox raster data sets and if you encounter issues when reading/writing data in other formats, you should report the [issue](https://github.com/jblindsay/whitebox-tools/issues). Please note that there are no plans to incorporate third-party libraries, like [GDAL](http://www.gdal.org), in the project given the design goal of keeping a pure (or as close as possible) Rust codebase. 90 | 91 | At present, there is limited ability in *WhiteboxTools* to read vector geospatial data. Support for Shapefile (and other common vector formats) will be enhanced within the library soon. 92 | 93 | LiDAR data can be read/written in the common [LAS](https://www.asprs.org/committee-general/laser-las-file-format-exchange-activities.html) data format. *WhiteboxTools* can read and write LAS files that have been compressed (zipped with a .zip extension) using the common DEFLATE algorithm. Note that only LAS file should be contained within a zipped archive file. The compressed LiDAR format LAZ and ESRI LiDAR format are not currently supported by the library. 94 | 95 | ## Contributing 96 | 97 | If you would like to contribute to the project as a developer, follow these instructions to get started: 98 | 99 | 1. Fork the WhiteboxTools-ArcGIS repository () 100 | 2. Create your feature branch (git checkout -b my-new-feature) 101 | 3. Commit your changes (git commit -am 'Add some feature') 102 | 4. Push to the branch (git push origin my-new-feature) 103 | 5. Create a new Pull Request 104 | 105 | Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion in the work shall be licensed as the [MIT license](https://opensource.org/licenses/MIT) without any additional terms or conditions. 106 | 107 | ## License 108 | 109 | The **ArcGIS Toolbox for WhiteboxTools** is distributed under the [MIT license](https://opensource.org/licenses/MIT), a permissive open-source (free software) license. 110 | 111 | ## Reporting Bugs 112 | 113 | **ArcGIS Toolbox for WhiteboxTools** is distributed as is and without warranty of suitability for application. If you encounter flaws with the software (i.e. bugs) please report the issue. Providing a detailed description of the conditions under which the bug occurred will help to identify the bug. *Use the [Issues tracker](https://github.com/opengeos/WhiteboxTools-ArcGIS/issues) on GitHub to report issues with the software and to request feature enchancements.* Please do not email Dr. Qiusheng Wu or Dr. John Lindsay directly with bugs. 114 | 115 | ## Toolbox Screenshots 116 | 117 | ![Toolbox-1](screenshots/Toolbox-1.png) 118 | ![Toolbox-2](screenshots/Toolbox-2.png) 119 | ![Toolbox-3](screenshots/Toolbox-3.png) -------------------------------------------------------------------------------- /WBT/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-2021 John Lindsay 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /WBT/PRE/automation.py: -------------------------------------------------------------------------------- 1 | ################################################################## 2 | # Steps for updating WhiteboxTools-ArcGIS 3 | # Step 0: - Update the whitebox_tools.json file in the whiteboxgui repository 4 | # Step 1 - Delete the existing develop branch: git branch -D develop 5 | # Step 2 - Create a new develop branch: git checkout -b develop 6 | # Step 3 - Delete the old WhiteboxTools_win_amd64.zip in the root folder if needed 7 | # Step 4 - Run automation.py 8 | # Step 5 - Commit and push changes 9 | # Step 6 - Merge pull request on GitHub 10 | # Step 7 - Switch to master branch and pull updates: git checkout master | git pull 11 | ################################################################## 12 | 13 | import json 14 | import os 15 | import re 16 | import shutil 17 | import sys 18 | import whitebox 19 | import urllib.request 20 | from zipfile import ZipFile 21 | from urllib.request import urlopen 22 | 23 | wbt = whitebox.WhiteboxTools() 24 | 25 | 26 | def to_camelcase(name): 27 | """ 28 | Convert snake_case name to CamelCase name 29 | """ 30 | return "".join(x.title() for x in name.split("_")) 31 | 32 | 33 | def to_label(name): 34 | """ 35 | Convert snake_case name to Title case label 36 | """ 37 | return " ".join(x.title() for x in name.split("_")) 38 | 39 | 40 | def to_snakecase(name): 41 | """ 42 | Convert CamelCase name to snake_case name 43 | """ 44 | s1 = re.sub("(.)([A-Z][a-z]+)", r"\1_\2", name) 45 | return re.sub("([a-z0-9])([A-Z])", r"\1_\2", s1).lower() 46 | 47 | 48 | def write_header(file_path, tool_list): 49 | """ 50 | Generate Python script header for ArcGIS Python Toolbox 51 | """ 52 | f_header = open(file_path, "w") 53 | f_header.write("import arcpy\n") 54 | f_header.write("import os\n") 55 | f_header.write("import webbrowser\n") 56 | f_header.write("from WBT.whitebox_tools import WhiteboxTools\n") 57 | f_header.write("if sys.version_info < (3, 0):\n") 58 | f_header.write(" from StringIO import StringIO\n") 59 | f_header.write("else:\n") 60 | f_header.write(" from io import StringIO\n\n") 61 | f_header.write("wbt = WhiteboxTools()\n") 62 | # ValueList (Dropdown List) for About WhiteboxTools functions (e.g., Run Tool, View Code) 63 | f_header.write("tool_labels = []\n\n") 64 | tool_list.sort() 65 | for tool in tool_list: 66 | f_header.write('tool_labels.append("{}")\n'.format(tool)) 67 | f_header.write("\n\n") 68 | f_header.close() 69 | 70 | 71 | def get_wbt_dict(): 72 | """Generate a dictionary containing information for all tools. 73 | 74 | Returns: 75 | dict: The dictionary containing information for all tools. 76 | """ 77 | 78 | url = "https://github.com/opengeos/whiteboxgui/raw/master/whiteboxgui/data/whitebox_tools.json" 79 | response = urlopen(url) 80 | wbt_dict = json.loads(response.read()) 81 | 82 | return wbt_dict 83 | 84 | 85 | def generate_tool_template(tool): 86 | """ 87 | Generate function block of each tool for the toolbox 88 | """ 89 | tool_params = [] 90 | for index, item in enumerate(tool["parameters"]): 91 | if index < 0: 92 | tool_params.append(item) 93 | else: 94 | item_dup = "{}={}".format(item, item) 95 | tool_params.append(item_dup) 96 | 97 | lines = [] 98 | lines.append("class {}(object):\n".format(tool["name"])) 99 | lines.append(" def __init__(self):\n") 100 | lines.append(' self.label = "{}"\n'.format(tool["label"])) 101 | lines.append(' self.description = "{}"\n'.format( 102 | tool["description"])) 103 | lines.append(' self.category = "{}"\n\n'.format(tool["category"])) 104 | lines.append(" def getParameterInfo(self):\n") 105 | # Loop through parameters 106 | lines.append(define_tool_params(tool["parameters"])) 107 | lines.append(" return params\n\n") 108 | lines.append(" def updateParameters(self, parameters):\n") 109 | lines.append(" return\n\n") 110 | lines.append(" def updateMessages(self, parameters):\n") 111 | lines.append(" for param in parameters:\n") 112 | lines.append(" param_str = param.valueAsText\n") 113 | lines.append(" if param_str is not None:\n") 114 | lines.append(" try:\n") 115 | lines.append(" desc = arcpy.Describe(param_str)\n") 116 | lines.append( 117 | ' if (".gdb\\\\" in desc.catalogPath) or (".mdb\\\\" in desc.catalogPath):\n' 118 | ) 119 | lines.append( 120 | ' param.setErrorMessage("Datasets stored in a Geodatabase are not supported.")\n' 121 | ) 122 | lines.append(" except:\n") 123 | lines.append(" param.clearMessage()\n") 124 | lines.append(" return\n\n") 125 | lines.append(" def execute(self, parameters, messages):\n") 126 | # Access parameters through parameters[x].valueAsText 127 | lines.append(define_execute(tool["parameters"])) 128 | # redirect standard output to tool dialogue 129 | lines.append(" old_stdout = sys.stdout\n") 130 | lines.append(" result = StringIO()\n") 131 | lines.append(" sys.stdout = result\n") 132 | 133 | # line = ' wbt.{}({})\n'.format(to_snakecase(tool['name']), ', '.join(tool['parameters']).replace(", class,", ", cls,")) 134 | line = " wbt.{}({})\n".format( 135 | to_snakecase(tool["name"]), 136 | ", ".join(tool_params).replace(", class=class,", 137 | ", cls=cls,").replace("input=input", "i=i"), 138 | ) 139 | 140 | # Deal with name conflict with reserved Python functions (and, or, not) 141 | if tool["name"] == "And": 142 | line = line.replace("and", "And") 143 | elif tool["name"] == "Or": 144 | line = line.replace("or", "Or") 145 | elif tool["name"] == "Not": 146 | line = line.replace("not", "Not") 147 | lines.append(line) 148 | lines.append(" sys.stdout = old_stdout\n") 149 | lines.append(" result_string = result.getvalue()\n") 150 | lines.append(" messages.addMessage(result_string)\n") 151 | lines.append(" return\n\n\n") 152 | return lines 153 | 154 | 155 | def define_tool_params(params): 156 | """ 157 | Generate function block for each tool parameter 158 | """ 159 | lines = [] 160 | for param in params: 161 | items = params[param] 162 | if items["optional"]: 163 | parameter_type = "Optional" 164 | else: 165 | parameter_type = "Required" 166 | 167 | if "NewFile" in items["parameter_type"]: 168 | direction = "Output" 169 | else: 170 | direction = "Input" 171 | 172 | if param == "class": # parameter cannot use Python reserved keyword 173 | param = "cls" 174 | 175 | data_type = get_data_type(items["parameter_type"]) 176 | 177 | # if data_type['multi_value'] and param == "i": 178 | # param = "inputs" 179 | 180 | if data_type["data_type"] == '"DERasterDataset"' and direction == "Output": 181 | data_type["data_type"] = '"DEFile"' 182 | data_type["data_filter"] = '["tif"]' 183 | # if a filter is used, the parameter must be changed to required. 184 | parameter_type = "Required" 185 | elif data_type["data_type"] == '"DERasterDataset"' and direction == "Input": 186 | data_type["data_type"] = '"GPRasterLayer"' 187 | elif data_type["data_type"] == '"DEShapefile"' and direction == "Input": 188 | data_type["data_type"] = '"GPFeatureLayer"' 189 | elif ( 190 | data_type["data_type"] == '["DERasterDataset", "GPDouble"]' 191 | and direction == "Input" 192 | ): 193 | data_type["data_type"] = '["GPRasterLayer", "GPDouble"]' 194 | 195 | if data_type["data_filter"] == '["html"]': 196 | parameter_type = "Required" 197 | 198 | lines.append(" {} = arcpy.Parameter(\n".format(param)) 199 | lines.append(' displayName="{}",\n'.format(items["name"])) 200 | lines.append(' name="{}",\n'.format(param)) 201 | lines.append(" datatype={},\n".format( 202 | data_type["data_type"])) 203 | lines.append( 204 | ' parameterType="{}",\n'.format(parameter_type)) 205 | lines.append(' direction="{}")\n'.format(direction)) 206 | 207 | if data_type["multi_value"]: 208 | lines.append(" {}.multiValue = True\n".format(param)) 209 | 210 | if len(data_type["dependency_field"]) > 0: 211 | if data_type["dependency_field"] == "input": 212 | data_type["dependency_field"] = "i" 213 | lines.append( 214 | " {}.parameterDependencies = [{}.name]\n".format( 215 | param, data_type["dependency_field"] 216 | ) 217 | ) 218 | 219 | if data_type["data_filter"] != "[]": 220 | if data_type["filter_type"] == '"ValueList"': 221 | lines.append( 222 | ' {}.filter.type = "ValueList"\n'.format(param)) 223 | 224 | if ( 225 | data_type["data_filter"] 226 | in ['["Point"]', '["Polyline"]', '["Polygon"]', '["las", "zip"]'] 227 | ) and direction == "Output": 228 | pass 229 | else: 230 | lines.append( 231 | " {}.filter.list = {}\n".format( 232 | param, data_type["data_filter"] 233 | ) 234 | ) 235 | 236 | if items["default_value"] is not None: 237 | if (items["default_value"] != "null") and (len(items["default_value"]) > 0): 238 | if "false" in items["default_value"]: 239 | items["default_value"] = False 240 | elif "true" in items["default_value"]: 241 | items["default_value"] = True 242 | 243 | lines.append( 244 | " {}.value = '{}'\n\n".format( 245 | param, items["default_value"]) 246 | ) 247 | else: 248 | lines.append("\n") 249 | 250 | line = " params = [{}]\n\n".format(", ".join(params)) 251 | if "class" in line: 252 | line = line.replace(", class,", ", cls,") 253 | 254 | lines.append(line) 255 | lines = "".join(lines) 256 | return lines 257 | 258 | 259 | def define_execute(params): 260 | """ 261 | Accessing tool parameters 262 | """ 263 | lines = [] 264 | for index, param in enumerate(params): 265 | # get the full path to a input raster or vector layer 266 | param_type = params[param]["parameter_type"] 267 | inputRasVec = [] 268 | inputRasVec.append({"ExistingFile": "Raster"}) 269 | # inputRasVec.append({'ExistingFileOrFloat': 'Raster'}) 270 | inputRasVec.append({"ExistingFile": {"Vector": "Point"}}) 271 | inputRasVec.append({"ExistingFile": {"Vector": "Line"}}) 272 | inputRasVec.append({"ExistingFile": {"Vector": "Polygon"}}) 273 | inputRasVec.append({"ExistingFile": {"Vector": "LineOrPolygon"}}) 274 | inputRasVec.append({"ExistingFile": {"Vector": "Any"}}) 275 | 276 | optional = False 277 | 278 | if "optional" in params[param].keys(): 279 | if params[param]["optional"] == "true": 280 | optional = True 281 | 282 | # deal with multi-value input 283 | items = params[param] 284 | data_type = get_data_type(items["parameter_type"]) 285 | # if data_type['multi_value'] and param == 'i': 286 | # param = "inputs" 287 | 288 | if param == "class": 289 | param = "cls" 290 | 291 | if param == "input": 292 | param = "i" 293 | 294 | # deal with multi-value inputs 295 | lines.append( 296 | " {} = parameters[{}].valueAsText\n".format(param, index)) 297 | if data_type["multi_value"]: 298 | lines.append(" if {} is not None:\n".format(param)) 299 | lines.append(' items = {}.split(";")\n'.format(param)) 300 | lines.append(" items_path = []\n") 301 | lines.append(" for item in items:\n") 302 | lines.append( 303 | " items_path.append(arcpy.Describe(item).catalogPath)\n" 304 | ) 305 | lines.append( 306 | ' {} = ";".join(items_path)\n'.format(param)) 307 | 308 | if param_type in inputRasVec: 309 | # lines.append(' desc = arcpy.Describe({})\n'.format(param)) 310 | # lines.append(' {} = desc.catalogPath\n'.format(param)) 311 | # if param_type == "Optional": 312 | lines.append(" if {} is not None:\n".format(param)) 313 | lines.append( 314 | " desc = arcpy.Describe({})\n".format(param)) 315 | lines.append(" {} = desc.catalogPath\n".format(param)) 316 | elif param_type == {"ExistingFileOrFloat": "Raster"}: 317 | lines.append(" if {} is not None:\n".format(param)) 318 | lines.append(" try:\n") 319 | lines.append( 320 | " {} = str(float({}))\n".format(param, param)) 321 | lines.append(" except:\n") 322 | lines.append( 323 | " desc = arcpy.Describe({})\n".format(param)) 324 | lines.append( 325 | " {} = desc.catalogPath\n".format(param)) 326 | 327 | # lines.append(' if ({} is not None) and {}.isnumeric() == False:\n'.format(param, param)) 328 | 329 | # if param == "cell_size": 330 | # print(param) 331 | 332 | # if param_type in inputRasVec: 333 | # lines.append(' if {} is not None:\n'.format(param)) 334 | # lines.append(' desc = arcpy.Describe({})\n'.format(param)) 335 | # lines.append(' {} = desc.catalogPath\n'.format(param)) 336 | # lines.append(' if (".gdb\\\\" in desc.catalogPath) or (".mdb\\\\" in desc.catalogPath):\n') 337 | # lines.append(' arcpy.AddError("Datasets stored in a Geodatabase are not supported.")\n') 338 | # elif optional: 339 | # lines.append(' if {} is None:\n'.format(param)) 340 | # lines.append(' {} = None\n'.format(param)) 341 | 342 | lines = "".join(lines) 343 | return lines 344 | 345 | 346 | def get_data_type(param): 347 | """ 348 | Convert WhiteboxTools data types to ArcGIS data types 349 | """ 350 | data_type = '"GPString"' # default data type 351 | data_filter = "[]" # https://goo.gl/EaVNzg 352 | filter_type = '""' 353 | multi_value = False 354 | dependency_field = "" 355 | 356 | # ArcGIS data types: https://goo.gl/95JtFu 357 | data_types = { 358 | "Boolean": '"GPBoolean"', 359 | "Integer": '"GPLong"', 360 | "Float": '"GPDouble"', 361 | "String": '"GPString"', 362 | "StringOrNumber": '["GPString", "GPDouble"]', 363 | "Directory": '"DEFolder"', 364 | "Raster": '"DERasterDataset"', 365 | "Csv": '"DEFile"', 366 | "Text": '"DEFile"', 367 | "Html": '"DEFile"', 368 | "Lidar": '"DEFile"', 369 | "Vector": '"DEShapefile"', 370 | "RasterAndVector": '["DERasterDataset", "DEShapefile"]', 371 | "ExistingFileOrFloat": '["DERasterDataset", "GPDouble"]', 372 | "ExistingFile": '["DERasterDataset"]', 373 | } 374 | 375 | vector_filters = { 376 | "Point": '["Point"]', 377 | "Points": '["Point"]', 378 | "Line": '["Polyline"]', 379 | "Lines": '["Polyline"]', 380 | "Polygon": '["Polygon"]', 381 | "Polygons": '["Polygon"]', 382 | "LineOrPolygon": '["Polyline", "Polygon"]', 383 | "Any": "[]", 384 | } 385 | 386 | if type(param) is str: 387 | data_type = data_types[param] 388 | 389 | else: 390 | for item in param: 391 | if item == "FileList": 392 | multi_value = True 393 | elif item == "OptionList": 394 | filter_type = '"ValueList"' 395 | data_filter = param[item] 396 | 397 | if param[item] == "Csv": 398 | data_filter = '["csv"]' 399 | elif param[item] == "Lidar": 400 | data_filter = '["las", "zip"]' 401 | elif param[item] == "Html": 402 | data_filter = '["html"]' 403 | 404 | if type(param[item]) is str: 405 | data_type = data_types[param[item]] 406 | elif type(param[item]) is dict: 407 | sub_item = param[item] 408 | for sub_sub_item in sub_item: 409 | data_type = data_types[sub_sub_item] 410 | if data_type == '"DEShapefile"': 411 | data_filter = vector_filters[sub_item[sub_sub_item]] 412 | elif item == "VectorAttributeField": 413 | data_type = '"Field"' 414 | dependency_field = param[item][1].replace("--", "") 415 | else: 416 | data_type = '"GPString"' 417 | 418 | if param == {"ExistingFileOrFloat": "Raster"}: 419 | data_type = '["DERasterDataset", "GPDouble"]' 420 | 421 | ret = {} 422 | ret["data_type"] = data_type 423 | ret["data_filter"] = data_filter 424 | ret["filter_type"] = filter_type 425 | ret["multi_value"] = multi_value 426 | ret["dependency_field"] = dependency_field 427 | 428 | return ret 429 | 430 | 431 | def get_github_url(tool_name, category): 432 | """ 433 | Generate source code link on Github 434 | """ 435 | # prefix = "https://github.com/jblindsay/whitebox-tools/blob/master/src/tools" 436 | url = wbt.view_code(tool_name).strip() 437 | # url = "{}/{}/{}.rs".format(prefix, category, tool_name) 438 | return url 439 | 440 | 441 | def get_github_tag(tool_name, category): 442 | """ 443 | Get GitHub HTML tag 444 | """ 445 | # prefix = "https://github.com/jblindsay/whitebox-tools/blob/master/src/tools" 446 | # url = "{}/{}/{}.rs".format(prefix, category, tool_name) 447 | url = wbt.view_code(tool_name).strip() 448 | # print(tool_name) 449 | # if tool_name == "split_vector_lines": 450 | # print(url) 451 | if "RUST_BACKTRACE" in url: 452 | url = "https://github.com/jblindsay/whitebox-tools/tree/master/whitebox-tools-app/src/tools" 453 | html_tag = "GitHub".format(url) 454 | return html_tag 455 | 456 | 457 | def get_book_url(tool_name, category): 458 | """ 459 | Get link to WhiteboxTools User Manual 460 | """ 461 | prefix = "https://www.whiteboxgeo.com/manual/wbt_book/available_tools" 462 | url = "{}/{}.html#{}".format(prefix, category, tool_name) 463 | return url 464 | 465 | 466 | def get_book_tag(tool_name, category): 467 | """ 468 | Get User Manual HTML tag 469 | """ 470 | prefix = "https://www.whiteboxgeo.com/manual/wbt_book/available_tools" 471 | url = "{}/{}.html#{}".format(prefix, category, tool_name) 472 | html_tag = "WhiteboxTools User Manual".format( 473 | url) 474 | return html_tag 475 | 476 | 477 | dir_path = os.path.dirname(os.path.realpath(__file__)) 478 | wbt_dir = os.path.dirname(dir_path) 479 | root_dir = os.path.dirname(wbt_dir) 480 | wbt_win_zip = os.path.join(root_dir, "WhiteboxTools_win_amd64.zip") 481 | 482 | # wbt_py = os.path.join(dir_path, "whitebox_tools.py") 483 | wbt_py = os.path.join(wbt_dir, "whitebox_tools.py") 484 | 485 | file_header_py = os.path.join(dir_path, "file_header.py") 486 | file_toolbox_py = os.path.join(dir_path, "file_toolbox.py") 487 | file_tool_py = os.path.join(dir_path, "file_tool.py") 488 | file_about_py = os.path.join(dir_path, "file_about.py") 489 | 490 | file_wbt_py = os.path.join(dir_path, "WhiteboxTools.py") 491 | file_wbt_pyt = os.path.join( 492 | os.path.dirname(os.path.dirname(dir_path)), "WhiteboxTools.pyt" 493 | ) 494 | 495 | if not os.path.exists(wbt_win_zip): 496 | print("Downloading WhiteboxTools binary ...") 497 | url = "https://www.whiteboxgeo.com/WBT_Windows/WhiteboxTools_win_amd64.zip" 498 | urllib.request.urlretrieve(url, wbt_win_zip) # Download WhiteboxTools 499 | else: 500 | print("WhiteboxTools binary already exists.") 501 | 502 | print("Decompressing WhiteboxTools_win_amd64.zip ...") 503 | with ZipFile(wbt_win_zip, "r") as zipObj: 504 | # Extract all the contents of zip file to the root directory 505 | zipObj.extractall(root_dir) 506 | 507 | MACOSX = os.path.join(root_dir, "__MACOSX") 508 | if os.path.exists(MACOSX): 509 | shutil.rmtree(MACOSX) 510 | 511 | 512 | tools_dict = get_wbt_dict() 513 | tool_labels = [tools_dict[tool]["label"] for tool in tools_dict.keys()] 514 | 515 | write_header(file_header_py, tool_labels) 516 | 517 | f_wbt = open(file_wbt_py, "w") 518 | 519 | # write toolbox header 520 | with open(file_header_py) as f: 521 | lines = f.readlines() 522 | f_wbt.writelines(lines) 523 | 524 | # write toolbox class 525 | with open(file_toolbox_py) as f: 526 | lines = f.readlines() 527 | f_wbt.writelines(lines) 528 | 529 | # write tool class 530 | for tool_name in tools_dict.keys(): 531 | f_wbt.write(" tools.append({})\n".format(tool_name)) 532 | f_wbt.write("\n self.tools = tools\n\n\n") 533 | 534 | with open(file_about_py) as f: 535 | lines = f.readlines() 536 | f_wbt.writelines(lines) 537 | 538 | for tool_name in tools_dict: 539 | print(tool_name) 540 | lines = generate_tool_template(tools_dict[tool_name]) 541 | f_wbt.writelines(lines) 542 | 543 | f_wbt.close() 544 | 545 | # copy WhiteboxTools.py to WhiteboxTool.pyt (final ArcGIS Python Toolbox) 546 | if os.path.exists(file_wbt_pyt): 547 | os.remove(file_wbt_pyt) 548 | shutil.copyfile(file_wbt_py, file_wbt_pyt) 549 | 550 | outlines = [] 551 | with open(wbt_py) as f: 552 | lines = f.readlines() 553 | for line in lines: 554 | if line.strip() == "import urllib.request": 555 | line = "" 556 | if line.strip() == "from subprocess import CalledProcessError, Popen, PIPE, STDOUT": 557 | line = """ 558 | from subprocess import CalledProcessError, Popen, PIPE, STDOUT 559 | if sys.version_info.major == 2: 560 | import urllib2 as urlopen 561 | else: 562 | import urllib.request as urlopen 563 | """ 564 | if 'f"={toolname}"' in line: 565 | line = ' args.append("={}".format(toolname))' 566 | if line.strip() == 'args2.append(f"--max_procs={val}")': 567 | line = ' args2.append("--max_procs={}".format(val))' 568 | if 'f"Warning: Unrecognized extension ext_name {ext_name}' in line: 569 | line = ' print("Warning: Unrecognized extension ext_name {}. Installing the GTE instead...".format(ext_name))\n' 570 | if line.strip() == "for entry in os.scandir(f'./{unzipped_dir_name}'):": 571 | line = " for entry in os.scandir('./{}'.format(unzipped_dir_name)):\n" 572 | if line.strip() == "new_path = entry.path.replace(f'{unzipped_dir_name}', 'plugins')": 573 | line = " new_path = entry.path.replace('{}'.format(unzipped_dir_name), 'plugins')\n" 574 | if line.strip() == "if os.path.exists(f'./{unzipped_dir_name}'):": 575 | line = " if os.path.exists('./{}'.format(unzipped_dir_name)):\n" 576 | if line.strip() == "shutil.rmtree(f'./{unzipped_dir_name}')": 577 | line = " shutil.rmtree('./{}'.format(unzipped_dir_name))\n" 578 | if "urllib.request" in line and "import" not in line: 579 | line = line.replace("urllib.request", "urlopen") 580 | 581 | outlines.append(line) 582 | 583 | with open(wbt_py, "w") as f: 584 | f.writelines(outlines) 585 | -------------------------------------------------------------------------------- /WBT/PRE/file_about.py: -------------------------------------------------------------------------------- 1 | class Help(object): 2 | def __init__(self): 3 | """Define the tool (tool name is the name of the class).""" 4 | self.label = "Help" 5 | self.description = "Help description for WhiteboxTools" 6 | self.category = "About WhiteboxTools" 7 | self.canRunInBackground = False 8 | 9 | def getParameterInfo(self): 10 | """Define parameter definitions""" 11 | params = None 12 | return params 13 | 14 | def isLicensed(self): 15 | """Set whether tool is licensed to execute.""" 16 | return True 17 | 18 | def updateParameters(self, parameters): 19 | """Modify the values and properties of parameters before internal 20 | validation is performed. This method is called whenever a parameter 21 | has been changed.""" 22 | return 23 | 24 | def updateMessages(self, parameters): 25 | """Modify the messages created by internal validation for each tool 26 | parameter. This method is called after internal validation.""" 27 | return 28 | 29 | def execute(self, parameters, messages): 30 | """The source code of the tool.""" 31 | messages.addMessage(wbt.help()) 32 | return 33 | 34 | 35 | class License(object): 36 | def __init__(self): 37 | """Define the tool (tool name is the name of the class).""" 38 | self.label = "License" 39 | self.description = "License information for WhiteboxTools." 40 | self.category = "About WhiteboxTools" 41 | self.canRunInBackground = False 42 | 43 | def getParameterInfo(self): 44 | """Define parameter definitions""" 45 | params = None 46 | return params 47 | 48 | def isLicensed(self): 49 | """Set whether tool is licensed to execute.""" 50 | return True 51 | 52 | def updateParameters(self, parameters): 53 | """Modify the values and properties of parameters before internal 54 | validation is performed. This method is called whenever a parameter 55 | has been changed.""" 56 | return 57 | 58 | def updateMessages(self, parameters): 59 | """Modify the messages created by internal validation for each tool 60 | parameter. This method is called after internal validation.""" 61 | return 62 | 63 | def execute(self, parameters, messages): 64 | """The source code of the tool.""" 65 | messages.addMessage(wbt.license()) 66 | return 67 | 68 | 69 | class Version(object): 70 | def __init__(self): 71 | """Define the tool (tool name is the name of the class).""" 72 | self.label = "Version" 73 | self.description = "Version information for WhiteboxTools." 74 | self.category = "About WhiteboxTools" 75 | self.canRunInBackground = False 76 | 77 | def getParameterInfo(self): 78 | """Define parameter definitions""" 79 | params = None 80 | return params 81 | 82 | def isLicensed(self): 83 | """Set whether tool is licensed to execute.""" 84 | return True 85 | 86 | def updateParameters(self, parameters): 87 | """Modify the values and properties of parameters before internal 88 | validation is performed. This method is called whenever a parameter 89 | has been changed.""" 90 | return 91 | 92 | def updateMessages(self, parameters): 93 | """Modify the messages created by internal validation for each tool 94 | parameter. This method is called after internal validation.""" 95 | return 96 | 97 | def execute(self, parameters, messages): 98 | """The source code of the tool.""" 99 | messages.addMessage(wbt.version()) 100 | return 101 | 102 | 103 | class ListTools(object): 104 | def __init__(self): 105 | """Define the tool (tool name is the name of the class).""" 106 | self.label = "List Tools" 107 | self.description = "All available tools in WhiteboxTools." 108 | self.category = "About WhiteboxTools" 109 | self.canRunInBackground = False 110 | 111 | def getParameterInfo(self): 112 | """Define parameter definitions""" 113 | 114 | # First parameter 115 | param0 = arcpy.Parameter( 116 | displayName="Keywords", 117 | name="keywords", 118 | datatype="GPString", 119 | parameterType="Optional", 120 | direction="Input") 121 | # param0.multiValue = True 122 | param0.value = "lidar" 123 | params = [param0] 124 | return params 125 | 126 | def isLicensed(self): 127 | """Set whether tool is licensed to execute.""" 128 | return True 129 | 130 | def updateParameters(self, parameters): 131 | """Modify the values and properties of parameters before internal 132 | validation is performed. This method is called whenever a parameter 133 | has been changed.""" 134 | return 135 | 136 | def updateMessages(self, parameters): 137 | """Modify the messages created by internal validation for each tool 138 | parameter. This method is called after internal validation.""" 139 | return 140 | 141 | def execute(self, parameters, messages): 142 | """The source code of the tool.""" 143 | param0 = parameters[0].valueAsText 144 | 145 | if param0 is None: 146 | tools = wbt.list_tools() 147 | else: 148 | tools = wbt.list_tools([param0]) 149 | 150 | for index, tool in enumerate(sorted(tools)): 151 | messages.addMessage("{}. {}: {}".format(index + 1, tool, tools[tool])) 152 | return 153 | 154 | 155 | class ToolHelp(object): 156 | def __init__(self): 157 | """Define the tool (tool name is the name of the class).""" 158 | self.label = "Tool Help" 159 | self.description = "Help description for a specific tool." 160 | self.category = "About WhiteboxTools" 161 | self.canRunInBackground = False 162 | 163 | def getParameterInfo(self): 164 | """Define parameter definitions""" 165 | tool_name = arcpy.Parameter( 166 | displayName="Select a tool", 167 | name="tool_name", 168 | datatype="GPString", 169 | parameterType="Required", 170 | direction="Input") 171 | 172 | tool_name.value = "Lidar Info" 173 | tool_name.filter.type = "ValueList" 174 | tool_name.filter.list = tool_labels 175 | 176 | params = [tool_name] 177 | return params 178 | 179 | def isLicensed(self): 180 | """Set whether tool is licensed to execute.""" 181 | return True 182 | 183 | def updateParameters(self, parameters): 184 | """Modify the values and properties of parameters before internal 185 | validation is performed. This method is called whenever a parameter 186 | has been changed.""" 187 | return 188 | 189 | def updateMessages(self, parameters): 190 | """Modify the messages created by internal validation for each tool 191 | parameter. This method is called after internal validation.""" 192 | return 193 | 194 | def execute(self, parameters, messages): 195 | """The source code of the tool.""" 196 | param0 = parameters[0].valueAsText 197 | tool_name = param0.replace(" ", "").strip() 198 | messages.addMessage(wbt.tool_help(tool_name)) 199 | return 200 | 201 | 202 | class ToolParameters(object): 203 | def __init__(self): 204 | """Define the tool (tool name is the name of the class).""" 205 | self.label = "Tool Parameters" 206 | self.description = "Tool parameter descriptions for a specific tool." 207 | self.category = "About WhiteboxTools" 208 | self.canRunInBackground = False 209 | 210 | def getParameterInfo(self): 211 | """Define parameter definitions""" 212 | tool_name = arcpy.Parameter( 213 | displayName="Select a tool", 214 | name="tool_name", 215 | datatype="GPString", 216 | parameterType="Required", 217 | direction="Input") 218 | 219 | tool_name.value = "Lidar Info" 220 | tool_name.filter.type = "ValueList" 221 | tool_name.filter.list = tool_labels 222 | 223 | params = [tool_name] 224 | return params 225 | 226 | def isLicensed(self): 227 | """Set whether tool is licensed to execute.""" 228 | return True 229 | 230 | def updateParameters(self, parameters): 231 | """Modify the values and properties of parameters before internal 232 | validation is performed. This method is called whenever a parameter 233 | has been changed.""" 234 | return 235 | 236 | def updateMessages(self, parameters): 237 | """Modify the messages created by internal validation for each tool 238 | parameter. This method is called after internal validation.""" 239 | return 240 | 241 | def execute(self, parameters, messages): 242 | """The source code of the tool.""" 243 | param0 = parameters[0].valueAsText 244 | tool_name = param0.replace(" ", "").strip() 245 | messages.addMessage(wbt.tool_parameters(tool_name)) 246 | return 247 | 248 | 249 | class ViewCode(object): 250 | def __init__(self): 251 | """Define the tool (tool name is the name of the class).""" 252 | self.label = "View Code" 253 | self.description = "Source code for a specific tool." 254 | self.category = "About WhiteboxTools" 255 | self.canRunInBackground = False 256 | 257 | def getParameterInfo(self): 258 | """Define parameter definitions""" 259 | tool_name = arcpy.Parameter( 260 | displayName="Select a tool", 261 | name="tool_name", 262 | datatype="GPString", 263 | parameterType="Required", 264 | direction="Input") 265 | 266 | tool_name.value = "Lidar Info" 267 | tool_name.filter.type = "ValueList" 268 | tool_name.filter.list = tool_labels 269 | 270 | params = [tool_name] 271 | return params 272 | 273 | def isLicensed(self): 274 | """Set whether tool is licensed to execute.""" 275 | return True 276 | 277 | def updateParameters(self, parameters): 278 | """Modify the values and properties of parameters before internal 279 | validation is performed. This method is called whenever a parameter 280 | has been changed.""" 281 | return 282 | 283 | def updateMessages(self, parameters): 284 | """Modify the messages created by internal validation for each tool 285 | parameter. This method is called after internal validation.""" 286 | return 287 | 288 | def execute(self, parameters, messages): 289 | """The source code of the tool.""" 290 | param0 = parameters[0].valueAsText 291 | tool_name = param0.replace(" ", "").strip() 292 | messages.addMessage("Opening default browser...") 293 | webbrowser.get('windows-default').open(wbt.view_code(tool_name)) 294 | messages.addMessage(wbt.view_code(tool_name)) 295 | return 296 | 297 | 298 | class RunTool(object): 299 | def __init__(self): 300 | """Define the tool (tool name is the name of the class).""" 301 | self.label = "Run Tool" 302 | self.description = "Runs a tool and specifies tool arguments." 303 | self.category = "About WhiteboxTools" 304 | self.canRunInBackground = False 305 | 306 | def getParameterInfo(self): 307 | """Define parameter definitions""" 308 | tool_name = arcpy.Parameter( 309 | displayName="Select a tool", 310 | name="tool_name", 311 | datatype="GPString", 312 | parameterType="Required", 313 | direction="Input") 314 | 315 | tool_name.value = "Breach Depressions" 316 | tool_name.filter.type = "ValueList" 317 | tool_name.filter.list = tool_labels 318 | 319 | args = arcpy.Parameter( 320 | displayName="Arguments", 321 | name="agrs", 322 | datatype="GPString", 323 | parameterType="Required", 324 | direction="Input") 325 | args.value = '--dem="/path/to/DEM.tif" --output="/path/to/output.tif"' 326 | 327 | params = [tool_name, args] 328 | return params 329 | 330 | def isLicensed(self): 331 | """Set whether tool is licensed to execute.""" 332 | return True 333 | 334 | def updateParameters(self, parameters): 335 | """Modify the values and properties of parameters before internal 336 | validation is performed. This method is called whenever a parameter 337 | has been changed.""" 338 | return 339 | 340 | def updateMessages(self, parameters): 341 | """Modify the messages created by internal validation for each tool 342 | parameter. This method is called after internal validation.""" 343 | return 344 | 345 | def execute(self, parameters, messages): 346 | param0 = parameters[0].valueAsText 347 | args = parameters[1].valueAsText 348 | tool_name = param0.replace(" ", "").strip() 349 | dir_path = os.path.dirname(os.path.realpath(__file__)) 350 | exe_path = os.path.join(dir_path, "WBT/whitebox_tools.exe") 351 | cmd = '{} --run={} {}'.format(exe_path, tool_name, args) 352 | if "-v" not in cmd: 353 | cmd = cmd + ' -v' 354 | messages.addMessage(cmd) 355 | messages.addMessage(os.popen(cmd).read().rstrip()) 356 | return 357 | 358 | 359 | -------------------------------------------------------------------------------- /WBT/PRE/file_header.py: -------------------------------------------------------------------------------- 1 | import arcpy 2 | import os 3 | import webbrowser 4 | from WBT.whitebox_tools import WhiteboxTools 5 | if sys.version_info < (3, 0): 6 | from StringIO import StringIO 7 | else: 8 | from io import StringIO 9 | 10 | wbt = WhiteboxTools() 11 | tool_labels = [] 12 | 13 | tool_labels.append("Absolute Value") 14 | tool_labels.append("Accumulation Curvature") 15 | tool_labels.append("Adaptive Filter") 16 | tool_labels.append("Add") 17 | tool_labels.append("Add Point Coordinates To Table") 18 | tool_labels.append("Aggregate Raster") 19 | tool_labels.append("And") 20 | tool_labels.append("Anova") 21 | tool_labels.append("Arc Cos") 22 | tool_labels.append("Arc Sin") 23 | tool_labels.append("Arc Tan") 24 | tool_labels.append("Arcosh") 25 | tool_labels.append("Arsinh") 26 | tool_labels.append("Artanh") 27 | tool_labels.append("Ascii To Las") 28 | tool_labels.append("Aspect") 29 | tool_labels.append("Assess Route") 30 | tool_labels.append("Atan2") 31 | tool_labels.append("Attribute Correlation") 32 | tool_labels.append("Attribute Correlation Neighbourhood Analysis") 33 | tool_labels.append("Attribute Histogram") 34 | tool_labels.append("Attribute Scattergram") 35 | tool_labels.append("Average Flowpath Slope") 36 | tool_labels.append("Average Normal Vector Angular Deviation") 37 | tool_labels.append("Average Overlay") 38 | tool_labels.append("Average Upslope Flowpath Length") 39 | tool_labels.append("Balance Contrast Enhancement") 40 | tool_labels.append("Basins") 41 | tool_labels.append("Bilateral Filter") 42 | tool_labels.append("Block Maximum Gridding") 43 | tool_labels.append("Block Minimum Gridding") 44 | tool_labels.append("Boundary Shape Complexity") 45 | tool_labels.append("Breach Depressions") 46 | tool_labels.append("Breach Depressions Least Cost") 47 | tool_labels.append("Breach Single Cell Pits") 48 | tool_labels.append("Breakline Mapping") 49 | tool_labels.append("Buffer Raster") 50 | tool_labels.append("Burn Streams At Roads") 51 | tool_labels.append("Canny Edge Detection") 52 | tool_labels.append("Ceil") 53 | tool_labels.append("Centroid") 54 | tool_labels.append("Centroid Vector") 55 | tool_labels.append("Change Vector Analysis") 56 | tool_labels.append("Circular Variance Of Aspect") 57 | tool_labels.append("Classify Buildings In Lidar") 58 | tool_labels.append("Classify Lidar") 59 | tool_labels.append("Classify Overlap Points") 60 | tool_labels.append("Clean Vector") 61 | tool_labels.append("Clip") 62 | tool_labels.append("Clip Lidar To Polygon") 63 | tool_labels.append("Clip Raster To Polygon") 64 | tool_labels.append("Closing") 65 | tool_labels.append("Clump") 66 | tool_labels.append("Colourize Based On Class") 67 | tool_labels.append("Colourize Based On Point Returns") 68 | tool_labels.append("Compactness Ratio") 69 | tool_labels.append("Conditional Evaluation") 70 | tool_labels.append("Conditioned Latin Hypercube") 71 | tool_labels.append("Conservative Smoothing Filter") 72 | tool_labels.append("Construct Vector Tin") 73 | tool_labels.append("Contours From Points") 74 | tool_labels.append("Contours From Raster") 75 | tool_labels.append("Convert Nodata To Zero") 76 | tool_labels.append("Convert Raster Format") 77 | tool_labels.append("Corner Detection") 78 | tool_labels.append("Correct Vignetting") 79 | tool_labels.append("Cos") 80 | tool_labels.append("Cosh") 81 | tool_labels.append("Cost Allocation") 82 | tool_labels.append("Cost Distance") 83 | tool_labels.append("Cost Pathway") 84 | tool_labels.append("Count If") 85 | tool_labels.append("Create Colour Composite") 86 | tool_labels.append("Create Hexagonal Vector Grid") 87 | tool_labels.append("Create Plane") 88 | tool_labels.append("Create Rectangular Vector Grid") 89 | tool_labels.append("Crispness Index") 90 | tool_labels.append("Cross Tabulation") 91 | tool_labels.append("Csv Points To Vector") 92 | tool_labels.append("Cumulative Distribution") 93 | tool_labels.append("Curvedness") 94 | tool_labels.append("D Inf Flow Accumulation") 95 | tool_labels.append("D Inf Mass Flux") 96 | tool_labels.append("D Inf Pointer") 97 | tool_labels.append("D8 Flow Accumulation") 98 | tool_labels.append("D8 Mass Flux") 99 | tool_labels.append("D8 Pointer") 100 | tool_labels.append("Dbscan") 101 | tool_labels.append("Decrement") 102 | tool_labels.append("Dem Void Filling") 103 | tool_labels.append("Depth In Sink") 104 | tool_labels.append("Depth To Water") 105 | tool_labels.append("Dev From Mean Elev") 106 | tool_labels.append("Diff From Mean Elev") 107 | tool_labels.append("Diff Of Gaussian Filter") 108 | tool_labels.append("Difference") 109 | tool_labels.append("Difference Curvature") 110 | tool_labels.append("Direct Decorrelation Stretch") 111 | tool_labels.append("Directional Relief") 112 | tool_labels.append("Dissolve") 113 | tool_labels.append("Distance To Outlet") 114 | tool_labels.append("Diversity Filter") 115 | tool_labels.append("Divide") 116 | tool_labels.append("Downslope Distance To Stream") 117 | tool_labels.append("Downslope Flowpath Length") 118 | tool_labels.append("Downslope Index") 119 | tool_labels.append("Edge Contamination") 120 | tool_labels.append("Edge Density") 121 | tool_labels.append("Edge Preserving Mean Filter") 122 | tool_labels.append("Edge Proportion") 123 | tool_labels.append("Elev Above Pit") 124 | tool_labels.append("Elev Percentile") 125 | tool_labels.append("Elev Relative To Min Max") 126 | tool_labels.append("Elev Relative To Watershed Min Max") 127 | tool_labels.append("Elevation Above Stream") 128 | tool_labels.append("Elevation Above Stream Euclidean") 129 | tool_labels.append("Eliminate Coincident Points") 130 | tool_labels.append("Elongation Ratio") 131 | tool_labels.append("Embankment Mapping") 132 | tool_labels.append("Emboss Filter") 133 | tool_labels.append("Equal To") 134 | tool_labels.append("Erase") 135 | tool_labels.append("Erase Polygon From Lidar") 136 | tool_labels.append("Erase Polygon From Raster") 137 | tool_labels.append("Euclidean Allocation") 138 | tool_labels.append("Euclidean Distance") 139 | tool_labels.append("Evaluate Training Sites") 140 | tool_labels.append("Exp") 141 | tool_labels.append("Exp2") 142 | tool_labels.append("Export Table To Csv") 143 | tool_labels.append("Exposure Towards Wind Flux") 144 | tool_labels.append("Extend Vector Lines") 145 | tool_labels.append("Extract Nodes") 146 | tool_labels.append("Extract Raster Values At Points") 147 | tool_labels.append("Extract Streams") 148 | tool_labels.append("Extract Valleys") 149 | tool_labels.append("Farthest Channel Head") 150 | tool_labels.append("Fast Almost Gaussian Filter") 151 | tool_labels.append("Fd8 Flow Accumulation") 152 | tool_labels.append("Fd8 Pointer") 153 | tool_labels.append("Feature Preserving Smoothing") 154 | tool_labels.append("Fetch Analysis") 155 | tool_labels.append("Fill Burn") 156 | tool_labels.append("Fill Depressions") 157 | tool_labels.append("Fill Depressions Planchon And Darboux") 158 | tool_labels.append("Fill Depressions Wang And Liu") 159 | tool_labels.append("Fill Missing Data") 160 | tool_labels.append("Fill Single Cell Pits") 161 | tool_labels.append("Filter Lidar") 162 | tool_labels.append("Filter Lidar Classes") 163 | tool_labels.append("Filter Lidar Scan Angles") 164 | tool_labels.append("Filter Raster Features By Area") 165 | tool_labels.append("Find Flightline Edge Points") 166 | tool_labels.append("Find Lowest Or Highest Points") 167 | tool_labels.append("Find Main Stem") 168 | tool_labels.append("Find No Flow Cells") 169 | tool_labels.append("Find Parallel Flow") 170 | tool_labels.append("Find Patch Or Class Edge Cells") 171 | tool_labels.append("Find Ridges") 172 | tool_labels.append("Fix Dangling Arcs") 173 | tool_labels.append("Flatten Lakes") 174 | tool_labels.append("Flightline Overlap") 175 | tool_labels.append("Flip Image") 176 | tool_labels.append("Flood Order") 177 | tool_labels.append("Floor") 178 | tool_labels.append("Flow Accumulation Full Workflow") 179 | tool_labels.append("Flow Length Diff") 180 | tool_labels.append("Gamma Correction") 181 | tool_labels.append("Gaussian Contrast Stretch") 182 | tool_labels.append("Gaussian Curvature") 183 | tool_labels.append("Gaussian Filter") 184 | tool_labels.append("Gaussian Scale Space") 185 | tool_labels.append("Generalize Classified Raster") 186 | tool_labels.append("Generalize With Similarity") 187 | tool_labels.append("Generating Function") 188 | tool_labels.append("Geomorphons") 189 | tool_labels.append("Greater Than") 190 | tool_labels.append("Hack Stream Order") 191 | tool_labels.append("Heat Map") 192 | tool_labels.append("Height Above Ground") 193 | tool_labels.append("High Pass Bilateral Filter") 194 | tool_labels.append("High Pass Filter") 195 | tool_labels.append("High Pass Median Filter") 196 | tool_labels.append("Highest Position") 197 | tool_labels.append("Hillshade") 198 | tool_labels.append("Hillslopes") 199 | tool_labels.append("Histogram Equalization") 200 | tool_labels.append("Histogram Matching") 201 | tool_labels.append("Histogram Matching Two Images") 202 | tool_labels.append("Hole Proportion") 203 | tool_labels.append("Horizon Angle") 204 | tool_labels.append("Horizontal Excess Curvature") 205 | tool_labels.append("Horton Stream Order") 206 | tool_labels.append("Hydrologic Connectivity") 207 | tool_labels.append("Hypsometric Analysis") 208 | tool_labels.append("Hypsometrically Tinted Hillshade") 209 | tool_labels.append("Idw Interpolation") 210 | tool_labels.append("Ihs To Rgb") 211 | tool_labels.append("Image Autocorrelation") 212 | tool_labels.append("Image Correlation") 213 | tool_labels.append("Image Correlation Neighbourhood Analysis") 214 | tool_labels.append("Image Regression") 215 | tool_labels.append("Image Segmentation") 216 | tool_labels.append("Image Slider") 217 | tool_labels.append("Image Stack Profile") 218 | tool_labels.append("Impoundment Size Index") 219 | tool_labels.append("In Place Add") 220 | tool_labels.append("In Place Divide") 221 | tool_labels.append("In Place Multiply") 222 | tool_labels.append("In Place Subtract") 223 | tool_labels.append("Increment") 224 | tool_labels.append("Individual Tree Detection") 225 | tool_labels.append("Insert Dams") 226 | tool_labels.append("Install Wb Extension") 227 | tool_labels.append("Integer Division") 228 | tool_labels.append("Integral Image") 229 | tool_labels.append("Intersect") 230 | tool_labels.append("Inverse Pca") 231 | tool_labels.append("Is No Data") 232 | tool_labels.append("Isobasins") 233 | tool_labels.append("Jenson Snap Pour Points") 234 | tool_labels.append("Join Tables") 235 | tool_labels.append("K Means Clustering") 236 | tool_labels.append("K Nearest Mean Filter") 237 | tool_labels.append("Kappa Index") 238 | tool_labels.append("Knn Classification") 239 | tool_labels.append("Knn Regression") 240 | tool_labels.append("Ks Test For Normality") 241 | tool_labels.append("Laplacian Filter") 242 | tool_labels.append("Laplacian Of Gaussian Filter") 243 | tool_labels.append("Las To Ascii") 244 | tool_labels.append("Las To Laz") 245 | tool_labels.append("Las To Multipoint Shapefile") 246 | tool_labels.append("Las To Shapefile") 247 | tool_labels.append("Las To Zlidar") 248 | tool_labels.append("Launch Wb Runner") 249 | tool_labels.append("Layer Footprint") 250 | tool_labels.append("Laz To Las") 251 | tool_labels.append("Lee Sigma Filter") 252 | tool_labels.append("Length Of Upstream Channels") 253 | tool_labels.append("Less Than") 254 | tool_labels.append("Lidar Block Maximum") 255 | tool_labels.append("Lidar Block Minimum") 256 | tool_labels.append("Lidar Classify Subset") 257 | tool_labels.append("Lidar Colourize") 258 | tool_labels.append("Lidar Contour") 259 | tool_labels.append("Lidar Digital Surface Model") 260 | tool_labels.append("Lidar Eigenvalue Features") 261 | tool_labels.append("Lidar Elevation Slice") 262 | tool_labels.append("Lidar Ground Point Filter") 263 | tool_labels.append("Lidar Hex Binning") 264 | tool_labels.append("Lidar Hillshade") 265 | tool_labels.append("Lidar Histogram") 266 | tool_labels.append("Lidar Idw Interpolation") 267 | tool_labels.append("Lidar Info") 268 | tool_labels.append("Lidar Join") 269 | tool_labels.append("Lidar Kappa Index") 270 | tool_labels.append("Lidar Nearest Neighbour Gridding") 271 | tool_labels.append("Lidar Point Density") 272 | tool_labels.append("Lidar Point Return Analysis") 273 | tool_labels.append("Lidar Point Stats") 274 | tool_labels.append("Lidar Ransac Planes") 275 | tool_labels.append("Lidar Rbf Interpolation") 276 | tool_labels.append("Lidar Remove Duplicates") 277 | tool_labels.append("Lidar Remove Outliers") 278 | tool_labels.append("Lidar Rooftop Analysis") 279 | tool_labels.append("Lidar Segmentation") 280 | tool_labels.append("Lidar Segmentation Based Filter") 281 | tool_labels.append("Lidar Shift") 282 | tool_labels.append("Lidar Sibson Interpolation") 283 | tool_labels.append("Lidar Thin") 284 | tool_labels.append("Lidar Thin High Density") 285 | tool_labels.append("Lidar Tile") 286 | tool_labels.append("Lidar Tile Footprint") 287 | tool_labels.append("Lidar Tin Gridding") 288 | tool_labels.append("Lidar Tophat Transform") 289 | tool_labels.append("Line Detection Filter") 290 | tool_labels.append("Line Intersections") 291 | tool_labels.append("Line Thinning") 292 | tool_labels.append("Linearity Index") 293 | tool_labels.append("Lines To Polygons") 294 | tool_labels.append("List Unique Values") 295 | tool_labels.append("List Unique Values Raster") 296 | tool_labels.append("Ln") 297 | tool_labels.append("Local Hypsometric Analysis") 298 | tool_labels.append("Local Quadratic Regression") 299 | tool_labels.append("Log10") 300 | tool_labels.append("Log2") 301 | tool_labels.append("Logistic Regression") 302 | tool_labels.append("Long Profile") 303 | tool_labels.append("Long Profile From Points") 304 | tool_labels.append("Longest Flowpath") 305 | tool_labels.append("Low Points On Headwater Divides") 306 | tool_labels.append("Lowest Position") 307 | tool_labels.append("Majority Filter") 308 | tool_labels.append("Map Off Terrain Objects") 309 | tool_labels.append("Max") 310 | tool_labels.append("Max Absolute Overlay") 311 | tool_labels.append("Max Anisotropy Dev") 312 | tool_labels.append("Max Anisotropy Dev Signature") 313 | tool_labels.append("Max Branch Length") 314 | tool_labels.append("Max Difference From Mean") 315 | tool_labels.append("Max Downslope Elev Change") 316 | tool_labels.append("Max Elev Dev Signature") 317 | tool_labels.append("Max Elevation Deviation") 318 | tool_labels.append("Max Overlay") 319 | tool_labels.append("Max Upslope Elev Change") 320 | tool_labels.append("Max Upslope Flowpath Length") 321 | tool_labels.append("Max Upslope Value") 322 | tool_labels.append("Maximal Curvature") 323 | tool_labels.append("Maximum Filter") 324 | tool_labels.append("Md Inf Flow Accumulation") 325 | tool_labels.append("Mean Curvature") 326 | tool_labels.append("Mean Filter") 327 | tool_labels.append("Median Filter") 328 | tool_labels.append("Medoid") 329 | tool_labels.append("Merge Line Segments") 330 | tool_labels.append("Merge Table With Csv") 331 | tool_labels.append("Merge Vectors") 332 | tool_labels.append("Min") 333 | tool_labels.append("Min Absolute Overlay") 334 | tool_labels.append("Min Dist Classification") 335 | tool_labels.append("Min Downslope Elev Change") 336 | tool_labels.append("Min Max Contrast Stretch") 337 | tool_labels.append("Min Overlay") 338 | tool_labels.append("Minimal Curvature") 339 | tool_labels.append("Minimum Bounding Box") 340 | tool_labels.append("Minimum Bounding Circle") 341 | tool_labels.append("Minimum Bounding Envelope") 342 | tool_labels.append("Minimum Convex Hull") 343 | tool_labels.append("Minimum Filter") 344 | tool_labels.append("Modified K Means Clustering") 345 | tool_labels.append("Modify Lidar") 346 | tool_labels.append("Modify No Data Value") 347 | tool_labels.append("Modulo") 348 | tool_labels.append("Mosaic") 349 | tool_labels.append("Mosaic With Feathering") 350 | tool_labels.append("Multi Part To Single Part") 351 | tool_labels.append("Multidirectional Hillshade") 352 | tool_labels.append("Multiply") 353 | tool_labels.append("Multiply Overlay") 354 | tool_labels.append("Multiscale Curvatures") 355 | tool_labels.append("Multiscale Elevation Percentile") 356 | tool_labels.append("Multiscale Roughness") 357 | tool_labels.append("Multiscale Roughness Signature") 358 | tool_labels.append("Multiscale Std Dev Normals") 359 | tool_labels.append("Multiscale Std Dev Normals Signature") 360 | tool_labels.append("Multiscale Topographic Position Image") 361 | tool_labels.append("Narrowness Index") 362 | tool_labels.append("Natural Neighbour Interpolation") 363 | tool_labels.append("Nearest Neighbour Gridding") 364 | tool_labels.append("Negate") 365 | tool_labels.append("New Raster From Base") 366 | tool_labels.append("Normal Vectors") 367 | tool_labels.append("Normalize Lidar") 368 | tool_labels.append("Normalized Difference Index") 369 | tool_labels.append("Not") 370 | tool_labels.append("Not Equal To") 371 | tool_labels.append("Num Downslope Neighbours") 372 | tool_labels.append("Num Inflowing Neighbours") 373 | tool_labels.append("Num Upslope Neighbours") 374 | tool_labels.append("Olympic Filter") 375 | tool_labels.append("Opening") 376 | tool_labels.append("Openness") 377 | tool_labels.append("Or") 378 | tool_labels.append("Paired Sample T Test") 379 | tool_labels.append("Panchromatic Sharpening") 380 | tool_labels.append("Parallelepiped Classification") 381 | tool_labels.append("Patch Orientation") 382 | tool_labels.append("Pennock Landform Class") 383 | tool_labels.append("Percent Elev Range") 384 | tool_labels.append("Percent Equal To") 385 | tool_labels.append("Percent Greater Than") 386 | tool_labels.append("Percent Less Than") 387 | tool_labels.append("Percentage Contrast Stretch") 388 | tool_labels.append("Percentile Filter") 389 | tool_labels.append("Perimeter Area Ratio") 390 | tool_labels.append("Phi Coefficient") 391 | tool_labels.append("Pick From List") 392 | tool_labels.append("Piecewise Contrast Stretch") 393 | tool_labels.append("Plan Curvature") 394 | tool_labels.append("Polygon Area") 395 | tool_labels.append("Polygon Long Axis") 396 | tool_labels.append("Polygon Perimeter") 397 | tool_labels.append("Polygon Short Axis") 398 | tool_labels.append("Polygonize") 399 | tool_labels.append("Polygons To Lines") 400 | tool_labels.append("Power") 401 | tool_labels.append("Prewitt Filter") 402 | tool_labels.append("Principal Component Analysis") 403 | tool_labels.append("Print Geo Tiff Tags") 404 | tool_labels.append("Profile") 405 | tool_labels.append("Profile Curvature") 406 | tool_labels.append("Qin Flow Accumulation") 407 | tool_labels.append("Quantiles") 408 | tool_labels.append("Quinn Flow Accumulation") 409 | tool_labels.append("Radial Basis Function Interpolation") 410 | tool_labels.append("Radius Of Gyration") 411 | tool_labels.append("Raise Walls") 412 | tool_labels.append("Random Field") 413 | tool_labels.append("Random Forest Classification") 414 | tool_labels.append("Random Forest Regression") 415 | tool_labels.append("Random Sample") 416 | tool_labels.append("Range Filter") 417 | tool_labels.append("Raster Area") 418 | tool_labels.append("Raster Calculator") 419 | tool_labels.append("Raster Cell Assignment") 420 | tool_labels.append("Raster Histogram") 421 | tool_labels.append("Raster Perimeter") 422 | tool_labels.append("Raster Streams To Vector") 423 | tool_labels.append("Raster Summary Stats") 424 | tool_labels.append("Raster To Vector Lines") 425 | tool_labels.append("Raster To Vector Points") 426 | tool_labels.append("Raster To Vector Polygons") 427 | tool_labels.append("Rasterize Streams") 428 | tool_labels.append("Reciprocal") 429 | tool_labels.append("Reclass") 430 | tool_labels.append("Reclass Equal Interval") 431 | tool_labels.append("Reclass From File") 432 | tool_labels.append("Reconcile Multiple Headers") 433 | tool_labels.append("Recover Flightline Info") 434 | tool_labels.append("Recreate Pass Lines") 435 | tool_labels.append("Reinitialize Attribute Table") 436 | tool_labels.append("Related Circumscribing Circle") 437 | tool_labels.append("Relative Aspect") 438 | tool_labels.append("Relative Topographic Position") 439 | tool_labels.append("Remove Field Edge Points") 440 | tool_labels.append("Remove Off Terrain Objects") 441 | tool_labels.append("Remove Polygon Holes") 442 | tool_labels.append("Remove Raster Polygon Holes") 443 | tool_labels.append("Remove Short Streams") 444 | tool_labels.append("Remove Spurs") 445 | tool_labels.append("Repair Stream Vector Topology") 446 | tool_labels.append("Resample") 447 | tool_labels.append("Rescale Value Range") 448 | tool_labels.append("Rgb To Ihs") 449 | tool_labels.append("Rho8 Flow Accumulation") 450 | tool_labels.append("Rho8 Pointer") 451 | tool_labels.append("Ring Curvature") 452 | tool_labels.append("River Centerlines") 453 | tool_labels.append("Roberts Cross Filter") 454 | tool_labels.append("Root Mean Square Error") 455 | tool_labels.append("Rotor") 456 | tool_labels.append("Round") 457 | tool_labels.append("Ruggedness Index") 458 | tool_labels.append("Scharr Filter") 459 | tool_labels.append("Sediment Transport Index") 460 | tool_labels.append("Select Tiles By Polygon") 461 | tool_labels.append("Set Nodata Value") 462 | tool_labels.append("Shadow Animation") 463 | tool_labels.append("Shadow Image") 464 | tool_labels.append("Shape Complexity Index") 465 | tool_labels.append("Shape Complexity Index Raster") 466 | tool_labels.append("Shape Index") 467 | tool_labels.append("Shreve Stream Magnitude") 468 | tool_labels.append("Sigmoidal Contrast Stretch") 469 | tool_labels.append("Sin") 470 | tool_labels.append("Single Part To Multi Part") 471 | tool_labels.append("Sinh") 472 | tool_labels.append("Sink") 473 | tool_labels.append("Slope") 474 | tool_labels.append("Slope Vs Aspect Plot") 475 | tool_labels.append("Slope Vs Elevation Plot") 476 | tool_labels.append("Smooth Vectors") 477 | tool_labels.append("Smooth Vegetation Residual") 478 | tool_labels.append("Snap Pour Points") 479 | tool_labels.append("Sobel Filter") 480 | tool_labels.append("Sort Lidar") 481 | tool_labels.append("Spherical Std Dev Of Normals") 482 | tool_labels.append("Split Colour Composite") 483 | tool_labels.append("Split Lidar") 484 | tool_labels.append("Split Vector Lines") 485 | tool_labels.append("Split With Lines") 486 | tool_labels.append("Square") 487 | tool_labels.append("Square Root") 488 | tool_labels.append("Standard Deviation Contrast Stretch") 489 | tool_labels.append("Standard Deviation Filter") 490 | tool_labels.append("Standard Deviation Of Slope") 491 | tool_labels.append("Stochastic Depression Analysis") 492 | tool_labels.append("Strahler Order Basins") 493 | tool_labels.append("Strahler Stream Order") 494 | tool_labels.append("Stream Link Class") 495 | tool_labels.append("Stream Link Identifier") 496 | tool_labels.append("Stream Link Length") 497 | tool_labels.append("Stream Link Slope") 498 | tool_labels.append("Stream Power Index") 499 | tool_labels.append("Stream Slope Continuous") 500 | tool_labels.append("Subbasins") 501 | tool_labels.append("Subtract") 502 | tool_labels.append("Sum Overlay") 503 | tool_labels.append("Surface Area Ratio") 504 | tool_labels.append("Svm Classification") 505 | tool_labels.append("Svm Regression") 506 | tool_labels.append("Symmetrical Difference") 507 | tool_labels.append("Tan") 508 | tool_labels.append("Tangential Curvature") 509 | tool_labels.append("Tanh") 510 | tool_labels.append("Thicken Raster Line") 511 | tool_labels.append("Time In Daylight") 512 | tool_labels.append("Tin Gridding") 513 | tool_labels.append("To Degrees") 514 | tool_labels.append("To Radians") 515 | tool_labels.append("Tophat Transform") 516 | tool_labels.append("Topo Render") 517 | tool_labels.append("Topographic Position Animation") 518 | tool_labels.append("Topological Stream Order") 519 | tool_labels.append("Total Curvature") 520 | tool_labels.append("Total Filter") 521 | tool_labels.append("Trace Downslope Flowpaths") 522 | tool_labels.append("Travelling Salesman Problem") 523 | tool_labels.append("Trend Surface") 524 | tool_labels.append("Trend Surface Vector Points") 525 | tool_labels.append("Tributary Identifier") 526 | tool_labels.append("Truncate") 527 | tool_labels.append("Turning Bands Simulation") 528 | tool_labels.append("Two Sample Ks Test") 529 | tool_labels.append("Union") 530 | tool_labels.append("Unnest Basins") 531 | tool_labels.append("Unsharp Masking") 532 | tool_labels.append("Unsphericity") 533 | tool_labels.append("Update Nodata Cells") 534 | tool_labels.append("Upslope Depression Storage") 535 | tool_labels.append("User Defined Weights Filter") 536 | tool_labels.append("Vector Hex Binning") 537 | tool_labels.append("Vector Lines To Raster") 538 | tool_labels.append("Vector Points To Raster") 539 | tool_labels.append("Vector Polygons To Raster") 540 | tool_labels.append("Vector Stream Network Analysis") 541 | tool_labels.append("Vertical Excess Curvature") 542 | tool_labels.append("Viewshed") 543 | tool_labels.append("Visibility Index") 544 | tool_labels.append("Voronoi Diagram") 545 | tool_labels.append("Watershed") 546 | tool_labels.append("Weighted Overlay") 547 | tool_labels.append("Weighted Sum") 548 | tool_labels.append("Wetness Index") 549 | tool_labels.append("Wilcoxon Signed Rank Test") 550 | tool_labels.append("Write Function Memory Insertion") 551 | tool_labels.append("Xor") 552 | tool_labels.append("Yield Filter") 553 | tool_labels.append("Yield Map") 554 | tool_labels.append("Yield Normalization") 555 | tool_labels.append("Z Scores") 556 | tool_labels.append("Zlidar To Las") 557 | tool_labels.append("Zonal Statistics") 558 | 559 | 560 | -------------------------------------------------------------------------------- /WBT/PRE/file_tool.py: -------------------------------------------------------------------------------- 1 | class Tool(object): 2 | def __init__(self): 3 | """Define the tool (tool name is the name of the class).""" 4 | self.label = "Tool" 5 | self.description = "" 6 | self.category = "" 7 | 8 | def getParameterInfo(self): 9 | """Define parameter definitions""" 10 | params = None 11 | return params 12 | 13 | def updateParameters(self, parameters): 14 | """Modify the values and properties of parameters before internal 15 | validation is performed. This method is called whenever a parameter 16 | has been changed.""" 17 | return 18 | 19 | def updateMessages(self, parameters): 20 | """Modify the messages created by internal validation for each tool 21 | parameter. This method is called after internal validation.""" 22 | return 23 | 24 | def execute(self, parameters, messages): 25 | """The source code of the tool.""" 26 | return 27 | 28 | 29 | -------------------------------------------------------------------------------- /WBT/PRE/file_toolbox.py: -------------------------------------------------------------------------------- 1 | class Toolbox(object): 2 | def __init__(self): 3 | """Define the toolbox (the name of the toolbox is the name of the .pyt file).""" 4 | self.label = "WhiteboxTools Toolbox" 5 | self.alias = "WBT" 6 | 7 | # List of tool classes associated with this toolbox 8 | tools = [] 9 | tools.append(Help) 10 | tools.append(License) 11 | tools.append(Version) 12 | tools.append(ListTools) 13 | tools.append(ToolHelp) 14 | tools.append(ToolParameters) 15 | tools.append(ViewCode) 16 | tools.append(RunTool) 17 | 18 | -------------------------------------------------------------------------------- /WBT/PRE/testing.py: -------------------------------------------------------------------------------- 1 | import whitebox 2 | import ast 3 | import json 4 | import os 5 | import sys 6 | 7 | wbt = whitebox.WhiteboxTools() 8 | # wbt.set_verbose_mode(True) 9 | # print(wbt.version()) 10 | # print(wbt.help()) 11 | 12 | 13 | # tools = wbt.list_tools(['dem']) 14 | 15 | 16 | # for index, tool in enumerate(tools): 17 | # print("{}. {}: {}".format(index, tool, tools[tool])) 18 | 19 | # def get_tool_params(tool_name): 20 | 21 | # out_str = wbt.tool_parameters(tool_name) 22 | # start_index = out_str.index('[') + 1 23 | # end_index = len(out_str.strip()) - 2 24 | # params = out_str[start_index : end_index] 25 | # print(params) 26 | 27 | # sub_params = params.split('{"name"') 28 | # param_list = [] 29 | 30 | # for param in sub_params: 31 | # param = param.strip() 32 | # if len(param) > 0: 33 | # item = '"name"' + param 34 | # item = item[ : item.rfind("}")].strip() 35 | # param_list.append(item) 36 | 37 | # params_dict = {} 38 | # for item in param_list: 39 | # print("{}\n".format(item)) 40 | # param_dict = {} 41 | # index_name = item.find("name") 42 | # index_flags = item.find("flags") 43 | # index_description = item.find("description") 44 | # index_parameter_type = item.find("parameter_type") 45 | # index_default_value = item.find("default_value") 46 | # index_optional = item.find("optional") 47 | 48 | # name = item[index_name - 1 : index_flags - 2].replace('"name":', '') 49 | # name = name.replace('"', '') 50 | # param_dict['name'] = name 51 | 52 | # flags = item[index_flags - 1 : index_description -2].replace('"flags":', '') 53 | # if "--" in flags: 54 | # flags = flags.split('--')[1][: -2] 55 | # else: 56 | # flags = flags.split('-')[1][: -2] 57 | # param_dict['flags'] = flags 58 | 59 | # desc = item[index_description - 1 : index_parameter_type - 2].replace('"description":', '') 60 | # desc = desc.replace('"', '') 61 | # param_dict['description'] = desc 62 | 63 | # param_type = item[index_parameter_type - 1 : index_default_value - 2].replace('"parameter_type":', '') 64 | # param_type = ast.literal_eval(param_type) 65 | # param_dict['parameter_type'] = param_type 66 | 67 | # default_value = item[index_default_value - 1 : index_optional - 2].replace('"default_value":', '') 68 | # param_dict['default_value'] = default_value 69 | 70 | # optional = item[index_optional - 1 :].replace('"optional":', '') 71 | # param_dict['optional'] = optional 72 | 73 | # params_dict[flags] = param_dict 74 | 75 | # return params_dict 76 | 77 | # tool_name = "BreachDepressions" 78 | # print(wbt.tool_parameters(tool_name)) 79 | 80 | 81 | # params = get_tool_params(tool_name) 82 | # print(params) 83 | # print(params.keys()) 84 | 85 | # print(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) 86 | 87 | # lines = wbt.list_tools() 88 | # print(lines) 89 | 90 | # # for line in lines: 91 | # # print(line) 92 | 93 | # print(len(lines)) 94 | 95 | # parameter_types = [] 96 | 97 | # for param in params: 98 | 99 | # param_type = params[param]['parameter_type'] 100 | # if param_type not in parameter_types: 101 | # parameter_types.append(param_type) 102 | 103 | 104 | # print(parameter_types) 105 | 106 | # thisset = {"apple", "banana", "cherry"} 107 | 108 | # thisset.add("orange") 109 | 110 | # print(thisset) 111 | 112 | # tools = wbt.list_tools() 113 | # for index, tool in enumerate(sorted(tools)): 114 | # print("{}: {}".format(index, tool)) 115 | 116 | # dem = "/media/hdd/Dropbox/git/WhiteboxTools-ArcGIS/testdata/DEM.tif" 117 | # output = "/media/hdd/Dropbox/git/WhiteboxTools-ArcGIS/testdata/output.tif" 118 | 119 | # wbt.run_tool("BreachDepressions", '--dem=dem --output=output') 120 | 121 | # exe_path = "/home/qiusheng/Downloads/WBT/whitebox_tools" 122 | 123 | # cmd = exe_path + ' --run=BreachDepressions --dem="/media/hdd/Dropbox/git/WhiteboxTools-ArcGIS/testdata/DEM.tif" --output="/media/hdd/Dropbox/git/WhiteboxTools-ArcGIS/testdata/output.tif" -v' 124 | # print(os.popen(cmd).read().rstrip()) 125 | 126 | # ret = wbt.breach_depressions(dem, output) 127 | # print(ret) 128 | # print(type(ret)) 129 | 130 | # def redirect_to_file(text): 131 | # original = sys.stdout 132 | # sys.stdout = open('/media/hdd/Dropbox/git/WhiteboxTools-ArcGIS/WBT/PRE/redirect.txt', 'w') 133 | # # print('This is your redirected text:') 134 | # # print(text) 135 | # wbt.breach_depressions(dem, output) 136 | # sys.stdout = original 137 | 138 | # print('This string goes to stdout, NOT the file!') 139 | 140 | # redirect_to_file('Python rocks!') 141 | 142 | # https://goo.gl/bFo2tD 143 | 144 | # import sys 145 | # if sys.version_info < (3, 0): 146 | # from StringIO import StringIO 147 | # else: 148 | # from io import StringIO 149 | # old_stdout = sys.stdout 150 | # result = StringIO() 151 | # sys.stdout = result 152 | # # wbt.breach_depressions(dem, output) 153 | # # print("test string") 154 | # sys.stdout = old_stdout 155 | # result_string = result.getvalue() 156 | # print(result_string) 157 | 158 | # print('--dem="/path/to/DEM.tif" --output="/path/to/output.tif"') -------------------------------------------------------------------------------- /WBT/UserManual.txt: -------------------------------------------------------------------------------- 1 | The WhiteboxTools User Manual is now available online at: 2 | 3 | https://www.whiteboxgeo.com/manual/wbt_book/preface.html 4 | 5 | Please see the manual for details on usage and for descriptions of available tools. 6 | The PDF version of the User Manual is no longer distributed along with the software. -------------------------------------------------------------------------------- /WBT/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/__init__.py -------------------------------------------------------------------------------- /WBT/img/WBRunner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WBRunner.png -------------------------------------------------------------------------------- /WBT/img/WBT_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WBT_icon.png -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WhiteboxToolsLogo.png -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 42 | 43 | 45 | image/svg+xml 46 | 48 | 49 | 50 | 51 | 52 | 57 | 60 | 66 | 84 | 93 | 102 | 111 | 120 | 129 | 138 | 147 | 148 | WhiteboxTools 163 | TM 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogoBlue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WhiteboxToolsLogoBlue.png -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogoGreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WhiteboxToolsLogoGreen.png -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogo_box_only.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WhiteboxToolsLogo_box_only.png -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogo_box_only.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 42 | 43 | 45 | image/svg+xml 46 | 48 | 49 | 50 | 51 | 52 | 57 | 60 | 66 | 84 | 93 | 102 | 111 | 120 | 129 | 138 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogo_vert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 42 | 43 | 45 | image/svg+xml 46 | 48 | 49 | 50 | 51 | 52 | 57 | 60 | 66 | 84 | 93 | 102 | 111 | 120 | 129 | 138 | 147 | 148 | 151 | WhiteboxTools 166 | TM 181 | 182 | 183 | 184 | 185 | -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogo_vert1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WhiteboxToolsLogo_vert1.png -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogo_vert2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WhiteboxToolsLogo_vert2.png -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogo_vert3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WhiteboxToolsLogo_vert3.png -------------------------------------------------------------------------------- /WBT/img/WhiteboxToolsLogo_vert4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/WhiteboxToolsLogo_vert4.png -------------------------------------------------------------------------------- /WBT/img/closed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/closed.gif -------------------------------------------------------------------------------- /WBT/img/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/closed.png -------------------------------------------------------------------------------- /WBT/img/open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/open.gif -------------------------------------------------------------------------------- /WBT/img/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/open.png -------------------------------------------------------------------------------- /WBT/img/tool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/tool.gif -------------------------------------------------------------------------------- /WBT/img/tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/img/tool.png -------------------------------------------------------------------------------- /WBT/plugins/conditional_evaluation.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/conditional_evaluation.exe -------------------------------------------------------------------------------- /WBT/plugins/conditional_evaluation.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "ConditionalEvaluation", 3 | "exe": "conditional_evaluation", 4 | "short_description": "Performs a conditional evaluation (if-then-else) operation on a raster.", 5 | "toolbox": "Math and Stats Tools", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=ConditionalEvaluation -i=DEM.tif --statement='value > 2500.0' --true=2500.0 --false=DEM.tif --output=onlyLowPlaces.tif", 8 | "parameters": [ 9 | { 10 | "name": "Input Raster", 11 | "flags": ["-i", "--input"], 12 | "description": "Name of the input raster file.", 13 | "parameter_type": {"ExistingFile":"Raster"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Conditional Statement e.g. value > 35.0:", 19 | "flags": ["--statement"], 20 | "description": "Conditional statement e.g. value > 35.0. This statement must be a valid Rust statement.", 21 | "parameter_type": "String", 22 | "default_value": "", 23 | "optional": false 24 | }, 25 | { 26 | "name": "Value Where TRUE (Raster File Or Constant Value)", 27 | "flags": ["--true"], 28 | "description": "Value where condition evaluates TRUE (input raster or constant value).", 29 | "parameter_type": {"ExistingFileOrFloat":"Raster"}, 30 | "default_value": null, 31 | "optional": true 32 | }, 33 | { 34 | "name": "Value Where FALSE (Raster File Or Constant Value)", 35 | "flags": ["--false"], 36 | "description": "Value where condition evaluates FALSE (input raster or constant value).", 37 | "parameter_type": {"ExistingFileOrFloat":"Raster"}, 38 | "default_value": null, 39 | "optional": true 40 | }, 41 | { 42 | "name": "Output Raster File", 43 | "flags": ["--output"], 44 | "description": "Name of the output raster file.", 45 | "parameter_type": {"NewFile":"Raster"}, 46 | "default_value": null, 47 | "optional": false 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /WBT/plugins/conditioned_latin_hypercube.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/conditioned_latin_hypercube.exe -------------------------------------------------------------------------------- /WBT/plugins/conditioned_latin_hypercube.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "ConditionedLatinHypercube", 3 | "exe": "conditioned_latin_hypercube", 4 | "short_description": "Implements conditioned Latin Hypercube sampling.", 5 | "toolbox": "Math and Stats Tools", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME run -i=Raster1.tif;Raster2.tif --output=sites.shp --samples=500", 8 | "parameters": [ 9 | { 10 | "name": "Input Raster", 11 | "flags": ["-i", "--inputs"], 12 | "description": "Name of the input raster file", 13 | "parameter_type": {"FileList":{"ExistingFile":"Raster"}}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output shapefile", 19 | "flags": ["-o", "--output"], 20 | "description": "Output shapefile", 21 | "parameter_type": {"NewFile":{"Vector":"Point"}}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Number of sample sites", 27 | "flags": ["--samples"], 28 | "description": "Number of sample sites returned", 29 | "parameter_type": "Integer", 30 | "default_value": "500", 31 | "optional": true 32 | }, 33 | { 34 | "name": "Number of resampling iterations", 35 | "flags": ["--iterations"], 36 | "description": "Maximum iterations (if stopping criteria not reached).", 37 | "parameter_type": "Integer", 38 | "default_value": "25000", 39 | "optional": true 40 | }, 41 | { 42 | "name": "RNG seed", 43 | "flags": ["--seed"], 44 | "description": "Seed for RNG consistency", 45 | "parameter_type": "Integer", 46 | "default_value": null, 47 | "optional": true 48 | }, 49 | { 50 | "name": "Random resample probability", 51 | "flags": ["--prob"], 52 | "description": "Probability of random resample or resampling worst strata between [0,1].", 53 | "parameter_type": "Float", 54 | "default_value": "0.5", 55 | "optional": true 56 | }, 57 | { 58 | "name": "Objective function threshold.", 59 | "flags": ["--threshold"], 60 | "description": "Objective function values below the theshold stop the resampling iterations.", 61 | "parameter_type": "Float", 62 | "default_value": null, 63 | "optional": true 64 | }, 65 | { 66 | "name": "Initial annealing temperature", 67 | "flags": ["--temp"], 68 | "description": "Initial annealing temperature between [0,1].", 69 | "parameter_type": "Float", 70 | "default_value": "1.0", 71 | "optional": true 72 | }, 73 | { 74 | "name": "Temperature decay factor", 75 | "flags": ["--temp_decay"], 76 | "description": "Annealing temperature decay proportion between [0,1]. Reduce temperature by this proportion each annealing cycle.", 77 | "parameter_type": "Float", 78 | "default_value": "0.05", 79 | "optional": true 80 | }, 81 | { 82 | "name": "Annealing cycle duration", 83 | "flags": ["--cycle"], 84 | "description": "Number of iterations before decaying annealing temperature.", 85 | "parameter_type": "Integer", 86 | "default_value": "10", 87 | "optional": true 88 | }, 89 | { 90 | "name": "Average the continuous Obj. Func.", 91 | "flags": ["--average"], 92 | "description": "Weight the continuous objective funtion by the 1/N contributing strata.", 93 | "parameter_type": "Boolean", 94 | "default_value": "false", 95 | "optional": true 96 | } 97 | ] 98 | } 99 | -------------------------------------------------------------------------------- /WBT/plugins/edge_contamination.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/edge_contamination.exe -------------------------------------------------------------------------------- /WBT/plugins/edge_contamination.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "EdgeContamination", 3 | "exe": "edge_contamination", 4 | "short_description": "Identifies grid cells within an input DEM that may be impacted by edge contamination for hydrological applications.", 5 | "toolbox": "Hydrological Analysis", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=EdgeContamination --dem=DEM.tif --output=edge_cont.tif --flow_type='dinf'", 8 | "parameters": [ 9 | { 10 | "name": "Input DEM Raster", 11 | "flags": ["-d", "--dem"], 12 | "description": "Name of the input DEM raster file; must be depressionless.", 13 | "parameter_type": {"ExistingFile":"Raster"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Raster File", 19 | "flags": ["-o", "--output"], 20 | "description": "Name of the output raster file.", 21 | "parameter_type": {"NewFile":"Raster"}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Flow Type", 27 | "flags": ["--flow_type"], 28 | "description": "Flow algorithm type, one of 'd8', 'mfd', or 'dinf'", 29 | "parameter_type": {"OptionList": ["d8", "mfd", "dinf"]}, 30 | "default_value": "mfd", 31 | "optional": true 32 | }, 33 | { 34 | "name": "Z Conversion Factor", 35 | "flags": ["--zfactor"], 36 | "description": "Optional multiplier for when the vertical and horizontal units are not the same.", 37 | "parameter_type": "Float", 38 | "default_value": "", 39 | "optional": true 40 | } 41 | ] 42 | } -------------------------------------------------------------------------------- /WBT/plugins/exposure_towards_wind_flux.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/exposure_towards_wind_flux.exe -------------------------------------------------------------------------------- /WBT/plugins/exposure_towards_wind_flux.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "ExposureTowardsWindFlux", 3 | "exe": "exposure_towards_wind_flux", 4 | "short_description": "Evaluates hydrologic connectivity within a DEM", 5 | "toolbox": "Geomorphometric Analysis", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=ExposureTowardsWindFlux -dem=input.tif -o=exposure.tif --azimuth=35.0 --max_dist=500.0", 8 | "parameters": [ 9 | { 10 | "name": "Input DEM Raster", 11 | "flags": ["-d", "--dem"], 12 | "description": "Name of the input DEM raster file.", 13 | "parameter_type": {"ExistingFile":"Raster"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Raster File", 19 | "flags": ["-o", "--output"], 20 | "description": "Name of the output raster file.", 21 | "parameter_type": {"NewFile":"Raster"}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Wind Azimuth (in degrees)", 27 | "flags": ["--azimuth"], 28 | "description": "Wind azimuth, in degrees.", 29 | "parameter_type": "Float", 30 | "default_value": "", 31 | "optional": false 32 | }, 33 | { 34 | "name": "Maximum Search Distance", 35 | "flags": ["--max_dist"], 36 | "description": "Optional maximum search distance. Minimum value is 5 x cell size.", 37 | "parameter_type": "Integer", 38 | "default_value": "", 39 | "optional": true 40 | }, 41 | { 42 | "name": "Z Conversion Factor", 43 | "flags": ["--zfactor"], 44 | "description": "Optional multiplier for when the vertical and horizontal units are not the same.", 45 | "parameter_type": "Float", 46 | "default_value": "", 47 | "optional": true 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /WBT/plugins/gaussian_scale_space.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/gaussian_scale_space.exe -------------------------------------------------------------------------------- /WBT/plugins/gaussian_scale_space.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "GaussianScaleSpace", 3 | "exe": "gaussian_scale_space", 4 | "short_description": "Uses the fast Gaussian approximation algorithm to produce scaled land-surface parameter measurements from an input DEM.", 5 | "toolbox": "Geomorphometric Analysis", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=GaussianScaleSpace --dem=DEM.tif --output=slope.tif --output_zscore=slope_z.tif --output_scale=slope_scale.tif --sigma=0.5 --step=1.0 --num_steps=100 --lsp='Slope'", 8 | "parameters": [ 9 | { 10 | "name": "Input DEM Raster", 11 | "flags": ["-d", "--dem"], 12 | "description": "Name of the input DEM raster file.", 13 | "parameter_type": {"ExistingFile":"Raster"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Input Vector Points File", 19 | "flags": ["-p", "--points"], 20 | "description": "Name of the input vector points shapefile.", 21 | "parameter_type": {"ExistingFile":{"Vector":"Point"}}, 22 | "default_value": null, 23 | "optional": true 24 | }, 25 | { 26 | "name": "Output Land-surface Parameter Raster File", 27 | "flags": ["-o", "--output"], 28 | "description": "Name of the output land-surface parameter raster file.", 29 | "parameter_type": {"NewFile":"Raster"}, 30 | "default_value": null, 31 | "optional": false 32 | }, 33 | { 34 | "name": "Output z-Score Raster File", 35 | "flags": ["--output_zscore"], 36 | "description": "Name of the output z-score raster file.", 37 | "parameter_type": {"NewFile":"Raster"}, 38 | "default_value": null, 39 | "optional": false 40 | }, 41 | { 42 | "name": "Output Scale Raster File", 43 | "flags": ["--output_scale"], 44 | "description": "Name of the output scale raster file.", 45 | "parameter_type": {"NewFile":"Raster"}, 46 | "default_value": null, 47 | "optional": false 48 | }, 49 | { 50 | "name": "Starting Scale", 51 | "flags": ["--sigma"], 52 | "description": "Initial sigma value (cells).", 53 | "parameter_type": "Float", 54 | "default_value": "0.5", 55 | "optional": false 56 | }, 57 | { 58 | "name": "Step Size", 59 | "flags": ["--step"], 60 | "description": "Step size as any positive non-zero integer.", 61 | "parameter_type": "Float", 62 | "default_value": "0.5", 63 | "optional": true 64 | }, 65 | { 66 | "name": "Number of Steps", 67 | "flags": ["--num_steps"], 68 | "description": "Number of steps.", 69 | "parameter_type": "Integer", 70 | "default_value": "10", 71 | "optional": true 72 | }, 73 | { 74 | "name": "Land-surface Parameter to Calculate", 75 | "flags": ["--lsp"], 76 | "description": "Output land-surface parameter; one of 'AnisotropyLTP', 'Aspect', 'DiffMeanElev', 'Eastness', 'Elevation', 'Hillshade', 'MeanCurvature', 'Northness', 'PlanCurvature', 'ProfileCurvature', 'Ruggedness', 'Slope', 'TanCurvature', 'TotalCurvature'.", 77 | "parameter_type": {"OptionList": ["AnisotropyLTP", "Aspect", "DiffMeanElev", "Eastness", "Elevation", "Hillshade", "MeanCurvature", "Northness", "PlanCurvature", "ProfileCurvature", "Ruggedness", "Slope", "TanCurvature", "TotalCurvature"]}, 78 | "default_value": "Slope", 79 | "optional": true 80 | }, 81 | { 82 | "name": "Z Conversion Factor", 83 | "flags": ["--z_factor"], 84 | "description": "Optional multiplier for when the vertical and horizontal units are not the same.", 85 | "parameter_type": "Float", 86 | "default_value": null, 87 | "optional": true 88 | } 89 | ] 90 | } -------------------------------------------------------------------------------- /WBT/plugins/heat_map.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/heat_map.exe -------------------------------------------------------------------------------- /WBT/plugins/heat_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "HeatMap", 3 | "exe": "heat_map", 4 | "short_description": "Calculates a heat map, or kernel density estimation (KDE), for an input point set.", 5 | "toolbox": "GIS Analysis", 6 | "license": "Proprietary", 7 | "example": ">> .*EXE_NAME -r=HeatMap -i=points.shp -o=density.tif --bandwidth=1000.0 --kernel='quartic' --cell_size=10.0", 8 | "parameters": [ 9 | { 10 | "name": "Input Points", 11 | "flags": ["-i", "--input"], 12 | "description": "Name of the input points shapefile.", 13 | "parameter_type": {"ExistingFile":{"Vector":"Point"}}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Weight Field Name (Optional)", 19 | "flags": ["--weights", "--weight_field"], 20 | "description": "Optional name of the attribute containing point weight.", 21 | "parameter_type": "String", 22 | "default_value": null, 23 | "optional": true 24 | }, 25 | { 26 | "name": "Output Raster Image", 27 | "flags": ["-o", "--output"], 28 | "description": "Name of the output raster image file.", 29 | "parameter_type": {"NewFile":"Raster"}, 30 | "default_value": null, 31 | "optional": false 32 | }, 33 | { 34 | "name": "Bandwidth", 35 | "flags": ["--bandwidth"], 36 | "description": "Bandwidth (metres).", 37 | "parameter_type": "Float", 38 | "default_value": "", 39 | "optional": false 40 | }, 41 | { 42 | "name": "Kernel Type", 43 | "flags": ["--kernel"], 44 | "description": "Kernel type; one of 'uniform', 'triangular', 'epanechnikov', 'quartic', 'triweight', 'tricube', 'gaussian', 'cosine', 'logistic', 'sigmoid', 'silverman'.", 45 | "parameter_type": {"OptionList": ["uniform", "triangular", "epanechnikov", "quartic", "triweight", "tricube", "gaussian", "cosine", "logistic", "sigmoid", "silverman"]}, 46 | "default_value": "quartic", 47 | "optional": true 48 | }, 49 | { 50 | "name": "Output Raster Cell Size (Optional)", 51 | "flags": ["--cell_size"], 52 | "description": "Optionally specified cell size of output raster, in metres. Not used when base raster is specified.", 53 | "parameter_type": "Float", 54 | "default_value": "", 55 | "optional": true 56 | }, 57 | { 58 | "name": "Base Raster (Optional)", 59 | "flags": ["--base"], 60 | "description": "Optionally specified input base raster file. Not used when a cell size is specified.", 61 | "parameter_type": {"ExistingFile":"Raster"}, 62 | "default_value": null, 63 | "optional": true 64 | } 65 | ] 66 | } -------------------------------------------------------------------------------- /WBT/plugins/individual_tree_detection.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/individual_tree_detection.exe -------------------------------------------------------------------------------- /WBT/plugins/individual_tree_detection.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "IndividualTreeDetection", 3 | "exe": "individual_tree_detection", 4 | "short_description": "Identifies points in a LiDAR point cloud that are associated with the tops of individual trees.", 5 | "toolbox": "LiDAR Tools", 6 | "license": "Proprietary", 7 | "example": ">> .*EXE_NAME -r=IndividualTreeDetection -i=points.laz -o=tree_tops.shp --min_search_radius=1.5 --min_height=2.0 --max_search_radius=8.0 --max_height=30.0 --only_use_veg", 8 | "parameters": [ 9 | { 10 | "name": "Input LiDAR File", 11 | "flags": ["-i", "--input"], 12 | "description": "Name of the input LiDAR file.", 13 | "parameter_type": {"ExistingFile":"Lidar"}, 14 | "default_value": null, 15 | "optional": true 16 | }, 17 | { 18 | "name": "Output Vector", 19 | "flags": ["-o", "--output"], 20 | "description": "Name of the output vector points file.", 21 | "parameter_type": {"NewFile":{"Vector":"Point"}}, 22 | "default_value": null, 23 | "optional": true 24 | }, 25 | { 26 | "name": "Min. Search Radius", 27 | "flags": ["--min_search_radius"], 28 | "description": "Minimum search radius (m).", 29 | "parameter_type": "Float", 30 | "default_value": "1.0", 31 | "optional": false 32 | }, 33 | { 34 | "name": "Min. Height", 35 | "flags": ["--min_height"], 36 | "description": "Minimum height (m).", 37 | "parameter_type": "Float", 38 | "default_value": "0.0", 39 | "optional": false 40 | }, 41 | { 42 | "name": "Max. Search Radius", 43 | "flags": ["--max_search_radius"], 44 | "description": "Maximum search radius (m).", 45 | "parameter_type": "Float", 46 | "default_value": "", 47 | "optional": true 48 | }, 49 | { 50 | "name": "Max. Height", 51 | "flags": ["--max_height"], 52 | "description": "Maximum height (m).", 53 | "parameter_type": "Float", 54 | "default_value": "", 55 | "optional": true 56 | }, 57 | { 58 | "name": "Only use veg. class points?", 59 | "flags": ["--only_use_veg"], 60 | "description": "Only use veg. class points?", 61 | "parameter_type": "Boolean", 62 | "default_value": "false", 63 | "optional": true 64 | } 65 | ] 66 | } -------------------------------------------------------------------------------- /WBT/plugins/install_wb_extension.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/install_wb_extension.exe -------------------------------------------------------------------------------- /WBT/plugins/install_wb_extension.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "InstallWbExtension", 3 | "exe": "install_wb_extension", 4 | "short_description": "Use to install a Whitebox extension product.", 5 | "toolbox": "Whitebox Utilities", 6 | "license": "Proprietary", 7 | "example": ">> .*EXE_NAME -r=LaunchWbRunner", 8 | "parameters": [ 9 | { 10 | "name": "Whitebox Extension Product Name", 11 | "flags": ["--install_extension"], 12 | "description": "Name of the extension product to install. Options include: 'General Toolset Extension', 'DEM & Spatial Hydrology Extension', 'Lidar & Remote Sensing Extension', and 'Agriculture Extension'", 13 | "parameter_type": {"OptionList": ["General Toolset Extension", "DEM & Spatial Hydrology Extension", "Lidar & Remote Sensing Extension", "Agriculture Extension"]}, 14 | "default_value": "General Toolset Extension", 15 | "optional": false 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /WBT/plugins/launch_wb_runner.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/launch_wb_runner.exe -------------------------------------------------------------------------------- /WBT/plugins/launch_wb_runner.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "LaunchWbRunner", 3 | "exe": "launch_wb_runner", 4 | "short_description": "Opens the Whitebox Runner application.", 5 | "toolbox": "Whitebox Utilities", 6 | "license": "Proprietary", 7 | "example": ">> .*EXE_NAME -r=LaunchWbRunner", 8 | "parameters": [ 9 | { 10 | "name": "Clear the application state memory?", 11 | "flags": ["--clear_app_state"], 12 | "description": "Clear the application state memory?", 13 | "parameter_type": "Boolean", 14 | "default_value": "false", 15 | "optional": true 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /WBT/plugins/lidar_shift.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/lidar_shift.exe -------------------------------------------------------------------------------- /WBT/plugins/lidar_shift.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "LidarShift", 3 | "exe": "lidar_shift", 4 | "short_description": "Shifts the x,y,z coordinates of a LiDAR file.", 5 | "toolbox": "LiDAR Tools", 6 | "license": "Proprietary", 7 | "example": ">> .*EXE_NAME -r=LidarShift -i=input.las -o=output.las", 8 | "parameters": [ 9 | { 10 | "name": "Input LiDAR Points", 11 | "flags": ["-i", "--input"], 12 | "description": "Name of the input LiDAR points.", 13 | "parameter_type": {"ExistingFile":"Lidar"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output LiDAR Points", 19 | "flags": ["-o", "--output"], 20 | "description": "Name of the output LiDAR points.", 21 | "parameter_type": {"NewFile":"Lidar"}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "x-shift", 27 | "flags": ["-x", "--x_shift"], 28 | "description": "x-shift value, blank for none.", 29 | "parameter_type": "Float", 30 | "default_value": "", 31 | "optional": true 32 | }, 33 | { 34 | "name": "y-shift", 35 | "flags": ["-y", "--y_shift"], 36 | "description": "y-shift value, blank for none.", 37 | "parameter_type": "Float", 38 | "default_value": "", 39 | "optional": true 40 | }, 41 | { 42 | "name": "z-shift", 43 | "flags": ["-z", "--z_shift"], 44 | "description": "z-shift value, blank for none.", 45 | "parameter_type": "Float", 46 | "default_value": "", 47 | "optional": true 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /WBT/plugins/local_quadratic_regression.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/local_quadratic_regression.exe -------------------------------------------------------------------------------- /WBT/plugins/local_quadratic_regression.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "LocalQuadraticRegression", 3 | "exe": "local_quadratic_regression", 4 | "short_description": "An implementation of the constrained quadratic regression algorithm using a flexible window size described in Wood (1996).", 5 | "toolbox": "Geomorphometric Analysis", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=LocalQuadraticRegression --dem=DEM.tif --output=out_ras.tif --filter=15", 8 | "parameters": [ 9 | { 10 | "name": "Input DEM Raster", 11 | "flags": ["-d", "--dem"], 12 | "description": "Name of the input DEM raster file.", 13 | "parameter_type": {"ExistingFile":"Raster"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Raster File", 19 | "flags": ["-o", "--output"], 20 | "description": "Name of the output raster file.", 21 | "parameter_type": {"NewFile":"Raster"}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Filter Edge Length", 27 | "flags": ["--filter"], 28 | "description": "Edge length of the filter kernel.", 29 | "parameter_type": "Integer", 30 | "default_value": "3", 31 | "optional": true 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /WBT/plugins/max_upslope_value.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/max_upslope_value.exe -------------------------------------------------------------------------------- /WBT/plugins/max_upslope_value.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "MaxUpslopeValue", 3 | "exe": "max_upslope_value", 4 | "short_description": "Calculates the maximum upslope value from an input values raster along flowpaths.", 5 | "toolbox": "Hydrological Analysis", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=MaxUpslopeValue --dem=DEM.tif --values=values.tif --output=out.tif", 8 | "parameters": [ 9 | { 10 | "name": "Input DEM", 11 | "flags": ["-d", "--dem"], 12 | "description": "Input DEM; it must be depressionless.", 13 | "parameter_type": {"ExistingFile":"Raster"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Values Raster File", 19 | "flags": ["--values"], 20 | "description": "Name of the input values raster file.", 21 | "parameter_type": {"ExistingFile":"Raster"}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Output Raster File", 27 | "flags": ["--output"], 28 | "description": "Name of the output raster file.", 29 | "parameter_type": {"NewFile":"Raster"}, 30 | "default_value": null, 31 | "optional": false 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /WBT/plugins/normalize_lidar.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/normalize_lidar.exe -------------------------------------------------------------------------------- /WBT/plugins/normalize_lidar.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "NormalizeLidar", 3 | "exe": "normalize_lidar", 4 | "short_description": "Normalizes a LiDAR point cloud.", 5 | "toolbox": "LiDAR Tools", 6 | "license": "Proprietary", 7 | "example": ">> .*EXE_NAME -r=NormalizeLidar -i=points.laz -o=normalized.laz --dtm=dtm.tif", 8 | "parameters": [ 9 | { 10 | "name": "Input LiDAR File", 11 | "flags": ["-i", "--input"], 12 | "description": "Name of the input LiDAR file.", 13 | "parameter_type": {"ExistingFile":"Lidar"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Lidar File", 19 | "flags": ["-o", "--output"], 20 | "description": "Name of the output LiDAR file.", 21 | "parameter_type": {"NewFile":"Lidar"}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Input DTM Raster File", 27 | "flags": ["--dtm"], 28 | "description": "Name of the input digital terrain model (DTM) raster file.", 29 | "parameter_type": {"ExistingFile":"Raster"}, 30 | "default_value": null, 31 | "optional": false 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /WBT/plugins/qin_flow_accumulation.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/qin_flow_accumulation.exe -------------------------------------------------------------------------------- /WBT/plugins/qin_flow_accumulation.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "QinFlowAccumulation", 3 | "exe": "qin_flow_accumulation", 4 | "short_description": "Calculates Qin et al. (2007) flow accumulation.", 5 | "toolbox": "Hydrological Analysis", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=QinFlowAccumulation --dem=DEM.tif --output=QinMFD.tif --out_type='specific contributing area' --exponent=15.0 --max_slope=30.0 --threshold=10000", 8 | "parameters": [ 9 | { 10 | "name": "Input DEM Raster", 11 | "flags": ["-d", "--dem"], 12 | "description": "Name of the input DEM raster file; must be depressionless.", 13 | "parameter_type": {"ExistingFile":"Raster"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Raster File", 19 | "flags": ["--output"], 20 | "description": "Name of the output raster file.", 21 | "parameter_type": {"NewFile":"Raster"}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Output Type", 27 | "flags": ["--out_type"], 28 | "description": "Output type; one of 'cells', 'specific contributing area' (default), and 'catchment area'.", 29 | "parameter_type": {"OptionList": ["cells", "specific contributing area", "catchment area"]}, 30 | "default_value": "specific contributing area", 31 | "optional": true 32 | }, 33 | { 34 | "name": "Upper-bound Exponent Parameter", 35 | "flags": ["--exponent"], 36 | "description": "Optional upper-bound exponent parameter; default is 10.0.", 37 | "parameter_type": "Float", 38 | "default_value": "10.0", 39 | "optional": true 40 | }, 41 | { 42 | "name": "Upper-bound Slope Parameter (in degrees)", 43 | "flags": ["--max_slope"], 44 | "description": "Optional upper-bound slope parameter, in degrees (0-90); default is 45.0.", 45 | "parameter_type": "Float", 46 | "default_value": "45.0", 47 | "optional": true 48 | }, 49 | { 50 | "name": "Convergence Threshold (grid cells; blank for none)", 51 | "flags": ["--threshold"], 52 | "description": "Optional convergence threshold parameter, in grid cells; default is infinity.", 53 | "parameter_type": "Float", 54 | "default_value": null, 55 | "optional": true 56 | }, 57 | { 58 | "name": "Log-transform the output?", 59 | "flags": ["--log"], 60 | "description": "Log-transform the output values?", 61 | "parameter_type": "Boolean", 62 | "default_value": "false", 63 | "optional": true 64 | }, 65 | { 66 | "name": "Clip the upper tail by 1%?", 67 | "flags": ["--clip"], 68 | "description": "Optional flag to request clipping the display max by 1%.", 69 | "parameter_type": "Boolean", 70 | "default_value": "false", 71 | "optional": true 72 | } 73 | ] 74 | } -------------------------------------------------------------------------------- /WBT/plugins/quinn_flow_accumulation.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/quinn_flow_accumulation.exe -------------------------------------------------------------------------------- /WBT/plugins/quinn_flow_accumulation.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "QuinnFlowAccumulation", 3 | "exe": "quinn_flow_accumulation", 4 | "short_description": "Calculates Quinn et al. (1995) flow accumulation.", 5 | "toolbox": "Hydrological Analysis", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=QuinnFlowAccumulation --dem=DEM.tif --output=QMFD.tif --out_type='specific contributing area' --exponent=1.1 --threshold=10000", 8 | "parameters": [ 9 | { 10 | "name": "Input DEM Raster", 11 | "flags": ["-d", "--dem"], 12 | "description": "Name of the input DEM raster file; must be depressionless.", 13 | "parameter_type": {"ExistingFile":"Raster"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Raster File", 19 | "flags": ["--output"], 20 | "description": "Name of the output raster file.", 21 | "parameter_type": {"NewFile":"Raster"}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Output Type", 27 | "flags": ["--out_type"], 28 | "description": "Output type; one of 'cells', 'specific contributing area' (default), and 'catchment area'.", 29 | "parameter_type": {"OptionList": ["cells", "specific contributing area", "catchment area"]}, 30 | "default_value": "specific contributing area", 31 | "optional": true 32 | }, 33 | { 34 | "name": "Exponent Parameter", 35 | "flags": ["--exponent"], 36 | "description": "Optional exponent parameter; default is 1.0.", 37 | "parameter_type": "Float", 38 | "default_value": "1.0", 39 | "optional": true 40 | }, 41 | { 42 | "name": "Convergence Threshold (grid cells; blank for none)", 43 | "flags": ["--threshold"], 44 | "description": "Optional convergence threshold parameter, in grid cells; default is infinity.", 45 | "parameter_type": "Float", 46 | "default_value": null, 47 | "optional": true 48 | }, 49 | { 50 | "name": "Log-transform the output?", 51 | "flags": ["--log"], 52 | "description": "Log-transform the output values?", 53 | "parameter_type": "Boolean", 54 | "default_value": "false", 55 | "optional": true 56 | }, 57 | { 58 | "name": "Clip the upper tail by 1%?", 59 | "flags": ["--clip"], 60 | "description": "Optional flag to request clipping the display max by 1%.", 61 | "parameter_type": "Boolean", 62 | "default_value": "false", 63 | "optional": true 64 | } 65 | ] 66 | } -------------------------------------------------------------------------------- /WBT/plugins/raster_calculator.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/raster_calculator.exe -------------------------------------------------------------------------------- /WBT/plugins/raster_calculator.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "RasterCalculator", 3 | "exe": "raster_calculator", 4 | "short_description": "Performs a complex mathematical operations on one or more input raster images on a cell-to-cell basis.", 5 | "toolbox": "Math and Stats Tools", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=ConditionalEvaluation -i=DEM.tif --statement='value > 2500.0' --true=2500.0 --false=DEM.tif --output=onlyLowPlaces.tif", 8 | "parameters": [ 9 | { 10 | "name": "Statement:", 11 | "flags": ["--statement"], 12 | "description": "Statement e.g. cos(\"raster1\") * 35.0 + \"raster2\". This statement must be a valid Rust statement.", 13 | "parameter_type": "String", 14 | "default_value": "", 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Raster File", 19 | "flags": ["--output"], 20 | "description": "Name of the output raster file.", 21 | "parameter_type": {"NewFile":"Raster"}, 22 | "default_value": null, 23 | "optional": false 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /WBT/plugins/register_license.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/register_license.exe -------------------------------------------------------------------------------- /WBT/plugins/repair_stream_vector_topology.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/repair_stream_vector_topology.exe -------------------------------------------------------------------------------- /WBT/plugins/repair_stream_vector_topology.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "RepairStreamVectorTopology", 3 | "exe": "repair_stream_vector_topology", 4 | "short_description": "This tool resolves topological errors and inconsistencies associated with digitized vector streams.", 5 | "help": "This tool resolves topological errors and inconsistencies associated with digitized vector streams.", 6 | "toolbox": "Stream Network Analysis", 7 | "license": "MIT", 8 | "example": ">> .*EXE_NAME -r=RepairStreamVectorTopology --input=streams.shp --output=streams_fixed.shp --snap=2.0", 9 | "parameters": [ 10 | { 11 | "name": "Input Vector Lines", 12 | "flags": ["-i", "--input"], 13 | "description": "Name of the input lines vector file.", 14 | "parameter_type": {"ExistingFile":{"Vector":"Line"}}, 15 | "default_value": null, 16 | "optional": false 17 | }, 18 | { 19 | "name": "Output Lines", 20 | "flags": ["-o", "--output"], 21 | "description": "Name of the output lines vector file.", 22 | "parameter_type": {"NewFile":{"Vector":"Line"}}, 23 | "default_value": null, 24 | "optional": false 25 | }, 26 | { 27 | "name": "Snap Distance", 28 | "flags": ["--snap", "--dist"], 29 | "description": "Snap distance, in xy units (metres).", 30 | "parameter_type": "Float", 31 | "default_value": "", 32 | "optional": false 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /WBT/plugins/rho8_flow_accumulation.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/rho8_flow_accumulation.exe -------------------------------------------------------------------------------- /WBT/plugins/rho8_flow_accumulation.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "Rho8FlowAccumulation", 3 | "exe": "rho8_flow_accumulation", 4 | "short_description": "Calculates Fairfield and Leymarie (1991) flow accumulation.", 5 | "toolbox": "Hydrological Analysis", 6 | "license": "MIT", 7 | "example": ".*EXE_NAME -r=Rho8FlowAccumulation --dem=DEM.tif --output=Rho8.tif --out_type='specific contributing area'", 8 | "parameters": [ 9 | { 10 | "name": "Input DEM or Rho8 Pointer File", 11 | "flags": ["-i", "--input"], 12 | "description": "Input DEM or Rho8 pointer file; if a DEM is used, it must be depressionless.", 13 | "parameter_type": {"ExistingFile":"Raster"}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Raster File", 19 | "flags": ["--output"], 20 | "description": "Name of the output raster file.", 21 | "parameter_type": {"NewFile":"Raster"}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Output Type", 27 | "flags": ["--out_type"], 28 | "description": "Output type; one of 'cells', 'specific contributing area' (default), and 'catchment area'.", 29 | "parameter_type": {"OptionList": ["cells", "specific contributing area", "catchment area"]}, 30 | "default_value": "specific contributing area", 31 | "optional": true 32 | }, 33 | { 34 | "name": "Log-transform the output?", 35 | "flags": ["--log"], 36 | "description": "Log-transform the output values?", 37 | "parameter_type": "Boolean", 38 | "default_value": "false", 39 | "optional": true 40 | }, 41 | { 42 | "name": "Clip the upper tail by 1%?", 43 | "flags": ["--clip"], 44 | "description": "Optional flag to request clipping the display max by 1%.", 45 | "parameter_type": "Boolean", 46 | "default_value": "false", 47 | "optional": true 48 | }, 49 | { 50 | "name": "Is the input raster a Rho8 flow pointer?", 51 | "flags": ["--pntr"], 52 | "description": "Is the input raster a Rho8 flow pointer rather than a DEM?", 53 | "parameter_type": "Boolean", 54 | "default_value": "false", 55 | "optional": true 56 | }, 57 | { 58 | "name": "If a pointer is input, does it use the ESRI pointer scheme?", 59 | "flags": ["--esri_pntr"], 60 | "description": "Does the input Rho8 pointer use the ESRI style scheme?", 61 | "parameter_type": "Boolean", 62 | "default_value": "false", 63 | "optional": true 64 | } 65 | ] 66 | } -------------------------------------------------------------------------------- /WBT/plugins/split_vector_lines.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/split_vector_lines.exe -------------------------------------------------------------------------------- /WBT/plugins/split_vector_lines.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "SplitVectorLines", 3 | "exe": "split_vector_lines", 4 | "short_description": "Used to split a vector line coverage into even-lengthed segments.", 5 | "toolbox": "GIS Analysis", 6 | "license": "MIT", 7 | "example": ">> .*EXE_NAME -r=SplitVectorLines -i=input.shp -o=line_segments.shp --length=100.0", 8 | "parameters": [ 9 | { 10 | "name": "Input Lines", 11 | "flags": ["-i", "--input"], 12 | "description": "Name of the input lines shapefile.", 13 | "parameter_type": {"ExistingFile":{"Vector":"Line"}}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Lines", 19 | "flags": ["-o", "--output"], 20 | "description": "Name of the output lines shapefile.", 21 | "parameter_type": {"NewFile":{"Vector":"Line"}}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Max Segment Length", 27 | "flags": ["--length"], 28 | "description": "Maximum segment length (m).", 29 | "parameter_type": "Float", 30 | "default_value": null, 31 | "optional": true 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /WBT/plugins/travelling_salesman_problem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/travelling_salesman_problem.exe -------------------------------------------------------------------------------- /WBT/plugins/travelling_salesman_problem.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "TravellingSalesmanProblem", 3 | "exe": "travelling_salesman_problem", 4 | "short_description": "Finds approximate solutions to travelling salesman problems, the goal of which is to identify the shortest route connecting a set of locations.", 5 | "toolbox": "GIS Analysis", 6 | "license": "MIT", 7 | "example": ">> .*EXE_NAME -r=TravellingSalesmanProblem -i=input.shp -o=route.shp --duration=120", 8 | "parameters": [ 9 | { 10 | "name": "Input Points", 11 | "flags": ["-i", "--input"], 12 | "description": "Name of the input points shapefile.", 13 | "parameter_type": {"ExistingFile":{"Vector":"Point"}}, 14 | "default_value": null, 15 | "optional": false 16 | }, 17 | { 18 | "name": "Output Lines", 19 | "flags": ["-o", "--output"], 20 | "description": "Name of the output lines shapefile.", 21 | "parameter_type": {"NewFile":{"Vector":"Line"}}, 22 | "default_value": null, 23 | "optional": false 24 | }, 25 | { 26 | "name": "Max Duration", 27 | "flags": ["--duration"], 28 | "description": "Maximum duration, in seconds.", 29 | "parameter_type": "Integer", 30 | "default_value": "60", 31 | "optional": false 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /WBT/plugins/vector_stream_network_analysis.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/plugins/vector_stream_network_analysis.exe -------------------------------------------------------------------------------- /WBT/plugins/vector_stream_network_analysis.json: -------------------------------------------------------------------------------- 1 | { 2 | "tool_name": "VectorStreamNetworkAnalysis", 3 | "exe": "vector_stream_network_analysis", 4 | "short_description": "This tool performs common stream network analysis operations on an input vector stream file.", 5 | "help": "This tool performs common stream network analysis operations on an input vector stream file.", 6 | "toolbox": "Stream Network Analysis", 7 | "license": "MIT", 8 | "example": ">> .*EXE_NAME -r=VectorStreamNetworkAnalysis --streams=rivers.shp --dem=DEM.tif -o=network_analysis.shp --cutting_height=10.0 --snap=1.0", 9 | "parameters": [ 10 | { 11 | "name": "Input Streams Vector", 12 | "flags": ["--streams"], 13 | "description": "Name of the input streams vector file.", 14 | "parameter_type": {"ExistingFile":{"Vector":"Line"}}, 15 | "default_value": null, 16 | "optional": false 17 | }, 18 | { 19 | "name": "Input DEM Raster", 20 | "flags": ["--dem"], 21 | "description": "Name of the input DEM raster file.", 22 | "parameter_type": {"ExistingFile":"Raster"}, 23 | "default_value": null, 24 | "optional": false 25 | }, 26 | { 27 | "name": "Output Lines", 28 | "flags": ["-o", "--output"], 29 | "description": "Name of the output lines shapefile.", 30 | "parameter_type": {"NewFile":{"Vector":"Line"}}, 31 | "default_value": null, 32 | "optional": false 33 | }, 34 | { 35 | "name": "Maximum Ridge-cutting Height (z units)", 36 | "flags": ["--cutting_height"], 37 | "description": "Maximum ridge-cutting height (z units).", 38 | "parameter_type": "Float", 39 | "default_value": "10.0", 40 | "optional": true 41 | }, 42 | { 43 | "name": "Snap Distance", 44 | "flags": ["--snap"], 45 | "description": "Snap distance, in xy units (metres).", 46 | "parameter_type": "Float", 47 | "default_value": "0.1", 48 | "optional": true 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /WBT/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "verbose_mode": true, 3 | "working_directory": "/Users/johnlindsay/Downloads/", 4 | "compress_rasters": false, 5 | "max_procs": -1 6 | } -------------------------------------------------------------------------------- /WBT/whitebox_example.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | ''' This module provides examples of how to call the whitebox_tool script and the 3 | whitebox-tools geospatial analysis library using Python code. 4 | ''' 5 | 6 | # This script is part of the WhiteboxTools geospatial library. 7 | # Authors: Dr. John Lindsay 8 | # Created: November 28, 2017 9 | # Last Modified: Feb. 17, 2018 10 | # License: MIT 11 | 12 | from __future__ import print_function 13 | import os 14 | import sys 15 | from whitebox_tools import WhiteboxTools 16 | import urllib.request 17 | 18 | 19 | def main(): 20 | ''' main function 21 | ''' 22 | try: 23 | wbt = WhiteboxTools() 24 | 25 | # Get the root directory of WhiteboxTools source code or executable file 26 | root_dir = os.path.dirname(os.path.abspath(__file__)) 27 | # WhiteboxTools executable file name for MS Windows 28 | wbt_win_bin = os.path.join(root_dir, "whitebox_tools.exe") 29 | # WhiteboxTools executable file name for MacOS/Linux 30 | wbt_linux_bin = os.path.join(root_dir, "whitebox_tools") 31 | 32 | # If the WhiteboxTools executable file (whitbox_tools.exe) is in the same 33 | # directory as this script, set wbt path to the current directory 34 | # otherwise, set wbt path to (root_dir + "/target/release/") 35 | if os.path.isfile(wbt_win_bin) or os.path.isfile(wbt_linux_bin): 36 | wbt.set_whitebox_dir(root_dir) 37 | else: 38 | wbt.set_whitebox_dir(root_dir + "/target/release/") # or simply wbt.exe_path = ... 39 | 40 | # Set the working directory. This is the path to the folder containing the data, 41 | # i.e. files sent to tools as input/output parameters. You don't need to set 42 | # the working directory if you specify full path names as tool parameters. 43 | wbt.work_dir = os.path.dirname( 44 | os.path.abspath(__file__)) + "/testdata/" 45 | 46 | # If test datasets do not exist, download them from the WhiteboxTools repo 47 | if not os.path.exists(wbt.work_dir): 48 | os.mkdir(wbt.work_dir) 49 | dem_url = "https://github.com/jblindsay/whitebox-tools/raw/master/testdata/DEM.tif" 50 | dep_url = "https://github.com/jblindsay/whitebox-tools/raw/master/testdata/DEM.dep" 51 | urllib.request.urlretrieve(dem_url, "testdata/DEM.tif") 52 | urllib.request.urlretrieve(dep_url, "testdata/DEM.dep") 53 | 54 | # Sets verbose mode (True or False). Most tools will suppress output (e.g. updating 55 | # progress) when verbose mode is False. The default is True 56 | # wbt.set_verbose_mode(False) # or simply, wbt.verbose = False 57 | 58 | # The most convenient way to run a tool is to use its associated method, e.g.: 59 | if wbt.elev_percentile("DEM.tif", "output.tif", 15, 15) != 0: 60 | print("ERROR running tool") 61 | 62 | # You may also provide an optional custom callback for processing output from the 63 | # tool. If you don't provide a callback, and verbose is set to True, tool output 64 | # will simply be printed to the standard output. Also, notice that each tool has a 65 | # convenience method. While internally, whitebox_tools.exe uses CamelCase (MeanFilter) 66 | # to denote tool names, but the Python interface of whitebox_tools.py uses 67 | # snake_case (mean_filter), according to Python style conventions. 68 | 69 | # All of the convenience methods just call the 'run_tool' method, feeding it an 70 | # args array. This is an alternative way of calling tools: 71 | tool_name = "elev_percentile" 72 | args = ["--dem=\"DEM.dep\"", 73 | "--output=\"DEV_101.dep\"", 74 | "--filterx=101"] 75 | 76 | if wbt.run_tool(tool_name, args, my_callback) != 0: 77 | print("ERROR running {}".format(tool_name)) 78 | 79 | # Prints the whitebox-tools help...a listing of available commands 80 | print(wbt.help()) 81 | 82 | # Prints the whitebox-tools license 83 | print(wbt.license()) 84 | 85 | # Prints the whitebox-tools version 86 | print("Version information: {}".format(wbt.version())) 87 | 88 | # List all available tools in whitebox-tools 89 | print(wbt.list_tools()) 90 | 91 | # Lists tools with 'lidar' or 'LAS' in tool name or description. 92 | print(wbt.list_tools(['lidar', 'LAS'])) 93 | 94 | # Print the help for a specific tool. 95 | print(wbt.tool_help("ElevPercentile")) 96 | # Notice that tool names within WhiteboxTools.exe are CamelCase but 97 | # you can also use snake_case here, e.g. print(wbt.tool_help("elev_percentile")) 98 | 99 | except: 100 | print("Unexpected error:", sys.exc_info()[0]) 101 | raise 102 | 103 | 104 | def my_callback(out_str): 105 | ''' Create a custom callback to process the text coming out of the tool. 106 | If a callback is not provided, it will simply print the output stream. 107 | A custom callback allows for processing of the output stream. 108 | ''' 109 | try: 110 | if not hasattr(my_callback, 'prev_line_progress'): 111 | my_callback.prev_line_progress = False 112 | if "%" in out_str: 113 | str_array = out_str.split(" ") 114 | label = out_str.replace(str_array[len(str_array) - 1], "").strip() 115 | progress = int( 116 | str_array[len(str_array) - 1].replace("%", "").strip()) 117 | if my_callback.prev_line_progress: 118 | print('{0} {1}%'.format(label, progress), end="\r") 119 | else: 120 | my_callback.prev_line_progress = True 121 | print(out_str) 122 | elif "error" in out_str.lower(): 123 | print("ERROR: {}".format(out_str)) 124 | my_callback.prev_line_progress = False 125 | elif "elapsed time (excluding i/o):" in out_str.lower(): 126 | elapsed_time = ''.join( 127 | ele for ele in out_str if ele.isdigit() or ele == '.') 128 | units = out_str.lower().replace("elapsed time (excluding i/o):", 129 | "").replace(elapsed_time, "").strip() 130 | print("Elapsed time: {0}{1}".format(elapsed_time, units)) 131 | my_callback.prev_line_progress = False 132 | else: 133 | if callback.prev_line_progress: 134 | print('\n{0}'.format(out_str)) 135 | my_callback.prev_line_progress = False 136 | else: 137 | print(out_str) 138 | 139 | except: 140 | print(out_str) 141 | 142 | 143 | main() 144 | -------------------------------------------------------------------------------- /WBT/whitebox_tools.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/WBT/whitebox_tools.exe -------------------------------------------------------------------------------- /screenshots/ArcGIS-10.6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/screenshots/ArcGIS-10.6.png -------------------------------------------------------------------------------- /screenshots/Toolbox-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/screenshots/Toolbox-1.png -------------------------------------------------------------------------------- /screenshots/Toolbox-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/screenshots/Toolbox-2.png -------------------------------------------------------------------------------- /screenshots/Toolbox-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/screenshots/Toolbox-3.png -------------------------------------------------------------------------------- /screenshots/Toolbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/screenshots/Toolbox.png -------------------------------------------------------------------------------- /screenshots/arcgis-10.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/screenshots/arcgis-10.5.png -------------------------------------------------------------------------------- /screenshots/arcgis-pro-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/screenshots/arcgis-pro-2.png -------------------------------------------------------------------------------- /screenshots/arcgis-pro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/screenshots/arcgis-pro.png -------------------------------------------------------------------------------- /testdata/DEM/DEM.dep: -------------------------------------------------------------------------------- 1 | Min: 212.22877502441406 2 | Max: 1233.0966796875 3 | North: 4895782.5891085025 4 | South: 4878858.5400943495 5 | East: 686063.139196986 6 | West: 664737.0507251581 7 | Cols: 237 8 | Rows: 188 9 | Stacks: 1 10 | Data Type: FLOAT 11 | Z Units: not specified 12 | XY Units: metres 13 | Projection: not specified 14 | Data Scale: continuous 15 | Display Min: 212.22877502441406 16 | Display Max: 1233.0966796875 17 | Preferred Palette: high_relief.pal 18 | NoData: -32768.0 19 | Byte Order: LITTLE_ENDIAN 20 | Palette Nonlinearity: 1.0 21 | -------------------------------------------------------------------------------- /testdata/DEM/DEM.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/DEM/DEM.tif -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_B1.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_B1.TIF -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_B2.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_B2.TIF -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_B3.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_B3.TIF -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_B4.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_B4.TIF -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_B5.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_B5.TIF -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_B6.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_B6.TIF -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_B7.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_B7.TIF -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_B8.TIF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_B8.TIF -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_Boundary.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_Boundary.dbf: -------------------------------------------------------------------------------- 1 | w A=NameC<  -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_Boundary.prj: -------------------------------------------------------------------------------- 1 | PROJCS["NAD_1983_UTM_Zone_14N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-99.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_Boundary.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_Boundary.shp -------------------------------------------------------------------------------- /testdata/Landsat/LC80320272014265LGN00_Boundary.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Landsat/LC80320272014265LGN00_Boundary.shx -------------------------------------------------------------------------------- /testdata/Landsat/Readme.txt: -------------------------------------------------------------------------------- 1 | Landsat 8 scene id: LC80320272014265LGN00 2 | Acquisition Date: 2014-09-22 3 | Coverage area: Central North Dakota 4 | 5 | Downloaded from https://libra.developmentseed.org/ 6 | 7 | B1 - Coastal aerosol 8 | B2 - Blue 9 | B3 - Green 10 | B4 - Red 11 | B5 - Near Infrared 12 | B6 - Shortwave Infrared 1 13 | B7 - Shortwave Infrared 2 14 | B8 - Panchromatic 15 | -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Boundary.dbf: -------------------------------------------------------------------------------- 1 | u A=NameC<  -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Boundary.prj: -------------------------------------------------------------------------------- 1 | PROJCS["NAD_1983_UTM_Zone_14N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-99.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Boundary.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Boundary.shp -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Boundary.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Boundary.shx -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_LiDAR_2m.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_LiDAR_2m.tif -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_NAIP_2m.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_NAIP_2m.tif -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_NED_10m.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_NED_10m.tif -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Points.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Points.dbf -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Points.prj: -------------------------------------------------------------------------------- 1 | PROJCS["NAD_1983_UTM_Zone_14N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-99.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Points.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Points.sbn -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Points.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Points.sbx -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Points.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Points.shp -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Points.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Points.shx -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polygons.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polygons.dbf -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polygons.prj: -------------------------------------------------------------------------------- 1 | PROJCS["NAD_1983_UTM_Zone_14N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-99.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polygons.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polygons.sbn -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polygons.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polygons.sbx -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polygons.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polygons.shp -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polygons.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polygons.shx -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polylines.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polylines.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polylines.dbf -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polylines.prj: -------------------------------------------------------------------------------- 1 | PROJCS["NAD_1983_UTM_Zone_14N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-99.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polylines.sbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polylines.sbn -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polylines.sbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polylines.sbx -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polylines.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polylines.shp -------------------------------------------------------------------------------- /testdata/Wetlands/CLSA_Wetland_Polylines.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/Wetlands/CLSA_Wetland_Polylines.shx -------------------------------------------------------------------------------- /testdata/Wetlands/Readme.txt: -------------------------------------------------------------------------------- 1 | Cottonwood Lake Study Area(CLSA), Stutsman County, North Dakota. 2 | 3 | More info at: https://dx.doi.org/10.5066/F7707ZJ6 4 | -------------------------------------------------------------------------------- /testdata/WorldMap/Readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/WorldMap/Readme.txt -------------------------------------------------------------------------------- /testdata/WorldMap/TM_WORLD_BORDERS_SIMPL-0.3.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/WorldMap/TM_WORLD_BORDERS_SIMPL-0.3.dbf -------------------------------------------------------------------------------- /testdata/WorldMap/TM_WORLD_BORDERS_SIMPL-0.3.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] -------------------------------------------------------------------------------- /testdata/WorldMap/TM_WORLD_BORDERS_SIMPL-0.3.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/WorldMap/TM_WORLD_BORDERS_SIMPL-0.3.shp -------------------------------------------------------------------------------- /testdata/WorldMap/TM_WORLD_BORDERS_SIMPL-0.3.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opengeos/WhiteboxTools-ArcGIS/52eb0ce1a85818a20c1efd141f4106def42c983f/testdata/WorldMap/TM_WORLD_BORDERS_SIMPL-0.3.shx -------------------------------------------------------------------------------- /testdata/examples.py: -------------------------------------------------------------------------------- 1 | import os 2 | # import arcpy 3 | 4 | data_dir = os.path.dirname(os.path.abspath(__file__)) 5 | wbt_dir = os.path.dirname(data_dir) 6 | out_dir = os.path.join(os.path.expanduser("~"), "temp") 7 | 8 | if not os.path.exists(out_dir): 9 | os.makedirs(out_dir) 10 | 11 | tbx = os.path.join(wbt_dir, "WhiteboxTools.pyt") 12 | arcpy.ImportToolbox(tbx) 13 | 14 | input = os.path.join(data_dir, "Wetlands\CLSA_Wetland_Polygons.shp") 15 | output = os.path.join(out_dir, "test.tif") 16 | arcpy.VectorPolygonsToRaster_WBT(input, "FID", output, cell_size=10) 17 | print("Results saved at: {}".format(output)) --------------------------------------------------------------------------------