Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typos #443

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
{
"version": "0.1.0",
"version": "2.0.0",
"command": "cargo",
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
{
"taskName": "cargo build",
"label": "cargo build",
"type": "shell",
"args": [
"build"
],
"isBuildCommand": true
"problemMatcher": [],
"group": {
"_id": "build",
"isDefault": false
}
},
{
"taskName": "cargo run",
"label": "cargo run",
"type": "shell",
"args": [
"run"
]
],
"problemMatcher": []
},
{
"taskName": "cargo test",
"label": "cargo test",
"type": "shell",
"args": [
"test"
],
"isTestCommand": true
"problemMatcher": [],
"group": {
"_id": "test",
"isDefault": false
}
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The official WhiteboxTools User Manual can be found [at this link](https://white

## 1 Description

**WhiteboxTools** is an advanced geospatial data analysis platform developed by Prof. John Lindsay ([webpage](http://www.uoguelph.ca/~hydrogeo/index.html); [jblindsay](https://github.com/jblindsay)) at the [University of Guelph's](http://www.uoguelph.ca) [*Geomorphometry and Hydrogeomatics Research Group*](http://www.uoguelph.ca/~hydrogeo/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, classification, 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.
**WhiteboxTools** is an advanced geospatial data analysis platform developed by Prof. John Lindsay ([webpage](http://www.uoguelph.ca/~hydrogeo/index.html); [jblindsay](https://github.com/jblindsay)) at the [University of Guelph's](http://www.uoguelph.ca) [*Geomorphometry and Hydrogeomatics Research Group*](http://www.uoguelph.ca/~hydrogeo/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, classification, 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, analyzed 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.

## 2 Getting help

Expand Down
8 changes: 4 additions & 4 deletions whitebox-plugins/src/conditioned_latin_hypercube/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use rand::prelude::*;
/// on a set of input rasters with the same projections (`--inputs`), and is therefore a multidimensional stratified random
/// sampling scheme. A random subset of samples (`--samples`, n << N) is chosen from the population and iteratively resampled
/// (`--max_iter`) to minimize an objective function. An annealing schedule and a random resample probability
/// (`--rs_prob`) are used to control how likely a interation is to randomly resample, or resample the worst
/// (`--rs_prob`) are used to control how likely a interaction is to randomly resample, or resample the worst
/// strata, where higher values favour a more random sample, and lower values favour a more stratified sample.
///
/// The annealing process controls the probability that samples will be discarded each iteration.
Expand Down Expand Up @@ -105,7 +105,7 @@ fn help() {
--temp Initial annealing temperature between [0,1].
--temp_decay Annealing temperature decay rate between [0,1].
--cycle Annealing cycle length in iterations.
--average Weight the continuous objective funtion by the 1/N contributing strata.
--average Weight the continuous objective function by the 1/N contributing strata.

Input/output file names can be fully qualified, or can rely on the working directory contained in
the WhiteboxTools settings.json file.
Expand Down Expand Up @@ -154,7 +154,7 @@ fn run(args: &Vec<String>) -> Result<(), std::io::Error> {
let mut o_thresh = f64::MIN;
let mut rng_seed = -1isize;
let mut norm_o1 = false;
let mut weights = [1f64, 1f64, 1f64]; // add weights agruments later
let mut weights = [1f64, 1f64, 1f64]; // add weights arguments later

if args.len() == 0 {
return Err(Error::new(
Expand Down Expand Up @@ -585,7 +585,7 @@ fn run(args: &Vec<String>) -> Result<(), std::io::Error> {
}
}
}
// ramdomize reservoir sample order
// randomize reservoir sample order
reservoir.shuffle(&mut rng);

if verbose { println!("Calculating the correlation matrix..."); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const EPSILON: f64 = std::f64::EPSILON;
///
/// ![](../../doc_img/RepairStreamVectorTopology.png)
///
/// The user may optinally specify the name of the input vector stream network (`--input`) and the output file
/// The user may optionally specify the name of the input vector stream network (`--input`) and the output file
/// (`--output`). Note that if an input file is not specified by the user, the tool will search for all vector
/// files (*.shp) files contained within the current working directory. This feature can be very useful when
/// you need to process a large number of stream files contained within a single directory. The tool will
Expand Down
2 changes: 1 addition & 1 deletion whitebox-plugins/src/exposure_towards_wind_flux/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use num_cpus;
/// a hypothetical wind flux. It can be conceptualized as the angle between a plane orthogonal to the wind
/// and a plane that represents the local topography at a grid cell (Bohner and Antonic, 2007). The user must specify
/// the names of the input digital elevation model (`--dem`) and output file (`--output`), as well as the
/// dominant wind azimuth (`--azimuth`) and a maximum search distance (`--max_dist`) used to calclate the horizon
/// dominant wind azimuth (`--azimuth`) and a maximum search distance (`--max_dist`) used to calculate the horizon
/// angle. Notice that the specified azimuth represents a regional average wind direction.
///
/// Exposure towards the sloped wind flux essentially combines the relative terrain aspect and the maximum upwind
Expand Down
2 changes: 1 addition & 1 deletion whitebox-plugins/src/gaussian_scale_space/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ fn run(args: &Vec<String>) -> Result<(), std::io::Error> {
sigma_prev = sigma_actual;
let buffer = if sigma < 3f64 { // not fast gaussian, no buffer
0isize
} else { // is fast gaussian, buffer by upper window lenght
} else { // is fast gaussian, buffer by upper window length
filter_size + 1 // (filter_size as f64 / 2f64).floor() as isize + 1
};

Expand Down
2 changes: 1 addition & 1 deletion whitebox-plugins/src/local_quadratic_regression/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ impl Quadratic2d {
// b: Vector6<f64>
// ) -> Quadratic2d {
// if decomp.is_invertible() {
// let x = decomp.solve(&b).expect("Linear resolution fialed.");
// let x = decomp.solve(&b).expect("Linear resolution failed.");
// Quadratic2d::new(
// *x.get(0).unwrap(), // a
// *x.get(1).unwrap(), // b
Expand Down
4 changes: 2 additions & 2 deletions whitebox-plugins/src/repair_stream_vector_topology/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ fn run(args: &Vec<String>) -> Result<(), std::io::Error> {



// We want line segements to have the same orientation as the input lines. This may not always be
// We want line segments to have the same orientation as the input lines. This may not always be
// possible because two lines may have been joined at their ends (meaning at least one must be reversed)
// but the majority should follow the same direction
// Read each line segment into an rtree.
Expand Down Expand Up @@ -832,7 +832,7 @@ fn run(args: &Vec<String>) -> Result<(), std::io::Error> {
}


// If more than half of the vertices in a line have been reverse, reverse it back to the orginal order.
// If more than half of the vertices in a line have been reverse, reverse it back to the original order.
// Remember, output lines may be composed of multiple input lines some of which may have been reversed,
// while others were not. This voting scheme represents a 'majority' line order.
for fid in 0..polylines2.len() {
Expand Down
4 changes: 2 additions & 2 deletions whitebox-runner/src/tool_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl ToolInfo {
param_str.push_str(&format!(" {flag}={}", arg));
args.push(format!("{flag}={}", arg));
} else {
// we had an error parsing the user intput in a number.
// we had an error parsing the user input in a number.
rfd::MessageDialog::new()
.set_level(rfd::MessageLevel::Warning).set_title("Error Parsing Parameter")
.set_description(&format!("Error parsing a non-optional parameter {}.", parameter.name))
Expand Down Expand Up @@ -195,7 +195,7 @@ impl ToolInfo {
args.push(format!("{flag}='{}'", parameter.str_vec_value[0]));
},
Err(_) => {
// we had an error parsing the user intput in a number.
// we had an error parsing the user input in a number.
rfd::MessageDialog::new()
.set_level(rfd::MessageLevel::Warning).set_title("Error Parsing Parameter")
.set_description(&format!("Error parsing a non-optional parameter {}.", parameter.name))
Expand Down
43 changes: 23 additions & 20 deletions whitebox-tools-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,32 @@ The official WhiteboxTools User Manual can be found [at this link](https://jblin

**Contents**

1. [Description](#1-description)
2. [Downloads and Installation](#2-downloads-and-installation)
3. [Usage](#3-usage)
4. [Available Tools](#4-available-tools)
5. [Supported Data Formats](#5-supported-data-formats)
6. [Contributing](#6-contributing)
7. [License](#7-license)
8. [Reporting Bugs](#8-reporting-bugs)
9. [Known Issues](#9-known-issues)
10. [Frequently Asked Questions](#10-frequently-asked-questions)
* [Do I need Whitebox GAT to use WhiteboxTools?](#do-i-need-whitebox-gat-to-use-whiteboxtools)
* [How do I request a tool be added?](#how-do-i-request-a-tool-be-added)
* [Can WhiteboxTools be incorporated into other software and open-source GIS projects?](#can-whiteboxtools-be-incorporated-into-other-software-and-open-source-gis-projects)
* [What platforms does WhiteboxTools support?](#what-platforms-does-whiteboxtools-support)
* [What are the system requirements?](#what-are-the-system-requirements)
* [Are pre-compiled executables of WhiteboxTools available?](#are-pre-compiled-executables-of-whiteboxtools-available)
* [Why is WhiteboxTools Programmed in Rust?](#why-is-whiteboxtools-programmed-in-rust)
* [Do I need Rust installed on my computer to run WhiteboxTools?](#do-i-need-rust-installed-on-my-computer-to-run-whiteboxtools)
* [How does WhiteboxTools' design philosophy differ?](#how-does-whiteboxtools-design-philosophy-differ)
- [1 Description](#1-description)
- [2 Downloads and Installation](#2-downloads-and-installation)
- [Pre-compiled binaries](#pre-compiled-binaries)
- [Building from source code](#building-from-source-code)
- [Using Docker image](#using-docker-image)
- [3 Usage](#3-usage)
- [4 Available Tools](#4-available-tools)
- [5 Supported Data Formats](#5-supported-data-formats)
- [6 Contributing](#6-contributing)
- [7 License](#7-license)
- [8 Reporting Bugs](#8-reporting-bugs)
- [9 Known Issues](#9-known-issues)
- [10 Frequently Asked Questions](#10-frequently-asked-questions)
- [Do I need Whitebox GAT to use WhiteboxTools?](#do-i-need-whitebox-gat-to-use-whiteboxtools)
- [How do I request a tool be added?](#how-do-i-request-a-tool-be-added)
- [Can WhiteboxTools be incorporated into other software and open-source GIS projects?](#can-whiteboxtools-be-incorporated-into-other-software-and-open-source-gis-projects)
- [What platforms does WhiteboxTools support?](#what-platforms-does-whiteboxtools-support)
- [What are the system requirements?](#what-are-the-system-requirements)
- [Are pre-compiled executables of WhiteboxTools available?](#are-pre-compiled-executables-of-whiteboxtools-available)
- [Why is WhiteboxTools programmed in Rust?](#why-is-whiteboxtools-programmed-in-rust)
- [Do I need Rust installed on my computer to run WhiteboxTools?](#do-i-need-rust-installed-on-my-computer-to-run-whiteboxtools)
- [How does WhiteboxTools' design philosophy differ?](#how-does-whiteboxtools-design-philosophy-differ)

## 1 Description

**WhiteboxTools** is an advanced geospatial data analysis platform developed by Prof. John Lindsay ([webpage](http://www.uoguelph.ca/~hydrogeo/index.html); [jblindsay](https://github.com/jblindsay)) at the [University of Guelph's](http://www.uoguelph.ca) [*Geomorphometry and Hydrogeomatics Research Group*](http://www.uoguelph.ca/~hydrogeo/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.
**WhiteboxTools** is an advanced geospatial data analysis platform developed by Prof. John Lindsay ([webpage](http://www.uoguelph.ca/~hydrogeo/index.html); [jblindsay](https://github.com/jblindsay)) at the [University of Guelph's](http://www.uoguelph.ca) [*Geomorphometry and Hydrogeomatics Research Group*](http://www.uoguelph.ca/~hydrogeo/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, analyzed 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.

Although *WhiteboxTools* is intended to serve as a source of plugin tools for the [*Whitebox GAT*](http://www.uoguelph.ca/~hydrogeo/Whitebox/) open-source GIS project, the tools contained in the library are stand-alone and can run outside of the larger Whitebox GAT project. See [Usage](#usage) for further details. There have been a large number of requests to call *Whitebox GAT* tools and functionality from outside of the Whitebox user-interface (e.g. from Python automation scripts). *WhiteboxTools* is intended to meet these usage requirements. Eventually most of the approximately 400 tools contained within *Whitebox GAT* [will be ported](tool_porting.md) to *WhiteboxTools*. In addition to separating the processing capabilities and the user-interface (and thereby reducing the reliance on Java), this migration should significantly improve processing efficiency. This is because [Rust](https://www.rust-lang.org/en-US/), the programming language used to develop *WhiteboxTools*, is generally [faster than the equivalent Java code](https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/rust-java.html) and because many of the *WhiteboxTools* functions are designed to process data in parallel wherever possible. In contrast, the older Java codebase included largely single-threaded applications.

Expand Down
2 changes: 1 addition & 1 deletion whitebox-tools-app/src/tools/gis_analysis/clip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ impl WhiteboxTool for Clip {
// }

//////////////////////////////////////////////////////////////////////////////////////////
// This is the main part of the anaysis. It is responsible for rebuilding the polygons. //
// This is the main part of the analysis. It is responsible for rebuilding the polygons. //
//////////////////////////////////////////////////////////////////////////////////////////
let mut bb: Vec<BoundingBox> = vec![];
let mut current_node: usize;
Expand Down
Loading