From 98a2409be963322017657ecd3fe02357553324df Mon Sep 17 00:00:00 2001 From: Souleymane Maman Nouri Souley Date: Fri, 7 Feb 2025 23:08:28 -0100 Subject: [PATCH 1/2] Fixed typos --- README.md | 2 +- .../src/conditioned_latin_hypercube/main.rs | 6 +-- .../correct_stream_vector_direction/main.rs | 2 +- .../src/exposure_towards_wind_flux/main.rs | 2 +- .../src/gaussian_scale_space/main.rs | 2 +- .../src/repair_stream_vector_topology/main.rs | 4 +- whitebox-tools-app/README.md | 43 ++++++++++--------- .../src/tools/gis_analysis/clip.rs | 2 +- .../deviation_from_regional_direction.rs | 4 +- .../natural_neighbour_interpolation.rs | 2 +- .../src/tools/gis_analysis/raster_area.rs | 4 +- .../tools/gis_analysis/raster_perimeter.rs | 2 +- .../breach_depressions_least_cost.rs | 2 +- .../flow_accum_full_workflow.rs | 2 +- .../tools/image_analysis/unsharp_masking.rs | 2 +- .../tools/lidar_analysis/lidar_histogram.rs | 2 +- .../root_mean_square_error.rs | 4 +- .../raster_streams_to_vector.rs | 2 +- .../tools/terrain_analysis/downslope_index.rs | 2 +- .../drainage_preserving_smoothing.rs | 2 +- .../terrain_analysis/embankment_mapping.rs | 2 +- .../src/tools/terrain_analysis/geomorphons.rs | 2 +- .../multidirectional_hillshade.rs | 2 +- 23 files changed, 51 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index c3a3068de..78b7970ef 100755 --- a/README.md +++ b/README.md @@ -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 diff --git a/whitebox-plugins/src/conditioned_latin_hypercube/main.rs b/whitebox-plugins/src/conditioned_latin_hypercube/main.rs index 5b1a6736b..57bc4a242 100644 --- a/whitebox-plugins/src/conditioned_latin_hypercube/main.rs +++ b/whitebox-plugins/src/conditioned_latin_hypercube/main.rs @@ -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. @@ -154,7 +154,7 @@ fn run(args: &Vec) -> 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( @@ -585,7 +585,7 @@ fn run(args: &Vec) -> Result<(), std::io::Error> { } } } - // ramdomize reservoir sample order + // randomize reservoir sample order reservoir.shuffle(&mut rng); if verbose { println!("Calculating the correlation matrix..."); } diff --git a/whitebox-plugins/src/correct_stream_vector_direction/main.rs b/whitebox-plugins/src/correct_stream_vector_direction/main.rs index 432fa25bf..7d271b466 100644 --- a/whitebox-plugins/src/correct_stream_vector_direction/main.rs +++ b/whitebox-plugins/src/correct_stream_vector_direction/main.rs @@ -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 diff --git a/whitebox-plugins/src/exposure_towards_wind_flux/main.rs b/whitebox-plugins/src/exposure_towards_wind_flux/main.rs index 94e174d0c..4d9efc22f 100755 --- a/whitebox-plugins/src/exposure_towards_wind_flux/main.rs +++ b/whitebox-plugins/src/exposure_towards_wind_flux/main.rs @@ -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 diff --git a/whitebox-plugins/src/gaussian_scale_space/main.rs b/whitebox-plugins/src/gaussian_scale_space/main.rs index cacfc8426..ea444708f 100755 --- a/whitebox-plugins/src/gaussian_scale_space/main.rs +++ b/whitebox-plugins/src/gaussian_scale_space/main.rs @@ -655,7 +655,7 @@ fn run(args: &Vec) -> 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 }; diff --git a/whitebox-plugins/src/repair_stream_vector_topology/main.rs b/whitebox-plugins/src/repair_stream_vector_topology/main.rs index 445123995..d5663645e 100644 --- a/whitebox-plugins/src/repair_stream_vector_topology/main.rs +++ b/whitebox-plugins/src/repair_stream_vector_topology/main.rs @@ -746,7 +746,7 @@ fn run(args: &Vec) -> 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. @@ -832,7 +832,7 @@ fn run(args: &Vec) -> 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() { diff --git a/whitebox-tools-app/README.md b/whitebox-tools-app/README.md index 6ebaa6217..7b0a1c1dc 100755 --- a/whitebox-tools-app/README.md +++ b/whitebox-tools-app/README.md @@ -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. diff --git a/whitebox-tools-app/src/tools/gis_analysis/clip.rs b/whitebox-tools-app/src/tools/gis_analysis/clip.rs index 8c849d7a5..9ba8a1df6 100755 --- a/whitebox-tools-app/src/tools/gis_analysis/clip.rs +++ b/whitebox-tools-app/src/tools/gis_analysis/clip.rs @@ -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 = vec![]; let mut current_node: usize; diff --git a/whitebox-tools-app/src/tools/gis_analysis/deviation_from_regional_direction.rs b/whitebox-tools-app/src/tools/gis_analysis/deviation_from_regional_direction.rs index 64b468f12..a6b60dc5a 100644 --- a/whitebox-tools-app/src/tools/gis_analysis/deviation_from_regional_direction.rs +++ b/whitebox-tools-app/src/tools/gis_analysis/deviation_from_regional_direction.rs @@ -316,7 +316,7 @@ impl WhiteboxTool for DeviationFromRegionalDirection { num_polys_used += 1; long_axis * elongation } else { - 0.0 // If the poly isn't elongated enough, don't use it in caluclating the mean regional poly direction + 0.0 // If the poly isn't elongated enough, don't use it in calculating the mean regional poly direction }; // towards calculating the mean regional poly direction @@ -342,7 +342,7 @@ impl WhiteboxTool for DeviationFromRegionalDirection { )); } - // Calculate the weighted regional weighted mean direciton of the polygons + // Calculate the weighted regional weighted mean direction of the polygons let mut regional_angle = -(sum_sin.atan2(sum_cos) / 2.0).to_degrees() + 90.0; // divided by 2 because these are axial data not true directions // let mut regional_angle = -(sum_sin.atan2(sum_cos)).to_degrees() + 90.0; if regional_angle < 0.0 { regional_angle = 180.0 + regional_angle; } diff --git a/whitebox-tools-app/src/tools/gis_analysis/natural_neighbour_interpolation.rs b/whitebox-tools-app/src/tools/gis_analysis/natural_neighbour_interpolation.rs index 6694c1267..2db35e7e3 100755 --- a/whitebox-tools-app/src/tools/gis_analysis/natural_neighbour_interpolation.rs +++ b/whitebox-tools-app/src/tools/gis_analysis/natural_neighbour_interpolation.rs @@ -27,7 +27,7 @@ use std::thread; /// Sibson's (1981) natural neighbour method. Similar to inverse-distance-weight interpolation (`IdwInterpolation`), /// the natural neighbour method performs a weighted averaging of nearby point values to estimate the attribute /// (`--field`) value at grid cell intersections in the output raster (`--output`). However, the two methods differ -/// quite significantly in the way that neighbours are identified and in the weighting scheme. First, natural neigbhour +/// quite significantly in the way that neighbours are identified and in the weighting scheme. First, natural neighbour /// identifies neighbours to be used in the interpolation of a point by finding the points connected to the /// estimated value location in a [Delaunay triangulation](https://en.wikipedia.org/wiki/Delaunay_triangulation), that /// is, the so-called *natural neighbours*. This approach has the main advantage of not having to specify an arbitrary diff --git a/whitebox-tools-app/src/tools/gis_analysis/raster_area.rs b/whitebox-tools-app/src/tools/gis_analysis/raster_area.rs index 439591b25..11e9ebffe 100755 --- a/whitebox-tools-app/src/tools/gis_analysis/raster_area.rs +++ b/whitebox-tools-app/src/tools/gis_analysis/raster_area.rs @@ -24,7 +24,7 @@ use std::thread; /// by 10,000 and into square-kilometres by dividing by 1,000,000. If the input raster is in geographic coordinates (i.e. /// latitude and longitude) a warning will be issued and areas will be estimated based on per-row calculated degree lengths. /// -/// The tool can be run with a raster output (`--output`), a text output (`--out_text`), or both. If niether outputs are specified, +/// The tool can be run with a raster output (`--output`), a text output (`--out_text`), or both. If neither outputs are specified, /// the tool will automatically output a raster named `area.tif`. /// /// Zero values in the input raster may be excluded from the area analysis if the `--zero_back` flag is used. @@ -236,7 +236,7 @@ impl WhiteboxTool for RasterArea { } if !output_raster && !output_text { - println!("Warning: Niether a raster nor text outputs were selected. An area raster will be generated."); + println!("Warning: Neither a raster nor text outputs were selected. An area raster will be generated."); output_file = String::from("area.tif"); output_raster = true; } diff --git a/whitebox-tools-app/src/tools/gis_analysis/raster_perimeter.rs b/whitebox-tools-app/src/tools/gis_analysis/raster_perimeter.rs index 29e07452f..fd72b59ac 100755 --- a/whitebox-tools-app/src/tools/gis_analysis/raster_perimeter.rs +++ b/whitebox-tools-app/src/tools/gis_analysis/raster_perimeter.rs @@ -236,7 +236,7 @@ impl WhiteboxTool for RasterPerimeter { } if !output_raster && !output_text { - println!("Warning: Niether a raster nor text outputs were selected. An area raster will be generated."); + println!("Warning: Neither a raster nor text outputs were selected. An area raster will be generated."); output_file = String::from("area.tif"); output_raster = true; } diff --git a/whitebox-tools-app/src/tools/hydro_analysis/breach_depressions_least_cost.rs b/whitebox-tools-app/src/tools/hydro_analysis/breach_depressions_least_cost.rs index 6a356589e..983a0095d 100755 --- a/whitebox-tools-app/src/tools/hydro_analysis/breach_depressions_least_cost.rs +++ b/whitebox-tools-app/src/tools/hydro_analysis/breach_depressions_least_cost.rs @@ -29,7 +29,7 @@ use std::thread; /// algorithm with efficiency optimizations and other significant enhancements. The approach uses a least-cost /// path analysis to identify the breach channel that connects pit cells (i.e. grid cells for /// which there is no lower neighbour) to some distant lower cell. Prior to breaching and in order -/// to minimize the depth of breach channels, all pit cells are rised to the elevation of the lowest +/// to minimize the depth of breach channels, all pit cells are raised to the elevation of the lowest /// neighbour minus a small heigh value. Here, the cost of a breach path is determined by the amount /// of elevation lowering needed to cut the breach channel through the surrounding topography. /// diff --git a/whitebox-tools-app/src/tools/hydro_analysis/flow_accum_full_workflow.rs b/whitebox-tools-app/src/tools/hydro_analysis/flow_accum_full_workflow.rs index 62f8636aa..c9e3e39ff 100755 --- a/whitebox-tools-app/src/tools/hydro_analysis/flow_accum_full_workflow.rs +++ b/whitebox-tools-app/src/tools/hydro_analysis/flow_accum_full_workflow.rs @@ -667,7 +667,7 @@ impl WhiteboxTool for FlowAccumulationFullWorkflow { } } - // setting value here preserves solutions from error 1 but prevents this scan from beng parallelized + // setting value here preserves solutions from error 1 but prevents this scan from being parallelized flow_dir.set_value(row, col, new_val); // error 2: overshoot where flow points to a cell that points back into the original neighbourhood diff --git a/whitebox-tools-app/src/tools/image_analysis/unsharp_masking.rs b/whitebox-tools-app/src/tools/image_analysis/unsharp_masking.rs index 1c3d6e1fd..ff46fabfa 100755 --- a/whitebox-tools-app/src/tools/image_analysis/unsharp_masking.rs +++ b/whitebox-tools-app/src/tools/image_analysis/unsharp_masking.rs @@ -20,7 +20,7 @@ use std::thread; /// Unsharp masking is an image edge-sharpening technique commonly applied in digital image processing. /// Admittedly, the name 'unsharp' seems somewhat counter-intuitive given the purpose of the filter, which -/// is to enchance the definition of edge features within the input image (`--input`). This name comes +/// is to enhance the definition of edge features within the input image (`--input`). This name comes /// from the use of a blurred, or unsharpened, intermediate image (mask) in the process. The blurred image /// is combined with the positive (original) image, creating an image that exhibits enhanced feature definition. /// A caution is needed in that the output image, although clearer, may be a less accurate representation diff --git a/whitebox-tools-app/src/tools/lidar_analysis/lidar_histogram.rs b/whitebox-tools-app/src/tools/lidar_analysis/lidar_histogram.rs index da615a1bf..99e28bbd6 100755 --- a/whitebox-tools-app/src/tools/lidar_analysis/lidar_histogram.rs +++ b/whitebox-tools-app/src/tools/lidar_analysis/lidar_histogram.rs @@ -23,7 +23,7 @@ use std::process::Command; /// This tool can be used to plot a histogram of data derived from a LiDAR file. The user must specify the /// name of the input LAS file (`--input`), the name of the output HTML file (`--output`), the parameter /// (`--parameter`) to be plotted, and the amount (in percent) to clip the upper and lower tails of the f -/// requency distribution (`--clip`). The LiDAR parameters that can be plotted using `LidarHistogram` +/// frequency distribution (`--clip`). The LiDAR parameters that can be plotted using `LidarHistogram` /// include the point elevations, intensity values, scan angles, and class values. /// /// Use the `LidarPointStats` tool instead to examine the spatial distribution of LiDAR points. diff --git a/whitebox-tools-app/src/tools/math_stat_analysis/root_mean_square_error.rs b/whitebox-tools-app/src/tools/math_stat_analysis/root_mean_square_error.rs index 29712ee3c..8c5eb6011 100755 --- a/whitebox-tools-app/src/tools/math_stat_analysis/root_mean_square_error.rs +++ b/whitebox-tools-app/src/tools/math_stat_analysis/root_mean_square_error.rs @@ -20,8 +20,8 @@ use std::thread; /// This tool calculates the root-mean-square-error (RMSE) or root-mean-square-difference (RMSD) from two /// input rasters. If the two input rasters possess the same number of rows and columns, the RMSE is -/// calucated on a cell-by-cell basis, otherwise bilinear resampling is used. In addition to RMSE, -/// the tool also reports other common accuracy statistics including the mean verical error, the +/// calculated on a cell-by-cell basis, otherwise bilinear resampling is used. In addition to RMSE, +/// the tool also reports other common accuracy statistics including the mean vertical error, the /// 95% confidence limit (RMSE x 1.96), and the 90% linear error (LE90), which is the 90% percentile of /// the residuals between two raster surfaces. The LE90 is the most robust of the reported accuracy /// statistics when the residuals are non-Gaussian. The LE90 requires sorting the residual values, which diff --git a/whitebox-tools-app/src/tools/stream_network_analysis/raster_streams_to_vector.rs b/whitebox-tools-app/src/tools/stream_network_analysis/raster_streams_to_vector.rs index 730f6301d..a078952d0 100755 --- a/whitebox-tools-app/src/tools/stream_network_analysis/raster_streams_to_vector.rs +++ b/whitebox-tools-app/src/tools/stream_network_analysis/raster_streams_to_vector.rs @@ -29,7 +29,7 @@ use std::path; /// in the downstream flow direction, which can result in a significant reduction in the /// number of vertices in the output file, and therefore reduced file sizes. However, the /// user can optionally override this behaviour by specifying the `--all_vertices` input -/// parameter. If specified, this parameter has the effect of presering all of the verticies +/// parameter. If specified, this parameter has the effect of presering all of the vertices /// associated with grid cells in the input raster within the output vector file. /// /// # See Also diff --git a/whitebox-tools-app/src/tools/terrain_analysis/downslope_index.rs b/whitebox-tools-app/src/tools/terrain_analysis/downslope_index.rs index 1204394e2..7d11a9726 100755 --- a/whitebox-tools-app/src/tools/terrain_analysis/downslope_index.rs +++ b/whitebox-tools-app/src/tools/terrain_analysis/downslope_index.rs @@ -82,7 +82,7 @@ impl DownslopeIndex { }); parameters.push(ToolParameter { - name: "Verical Drop".to_owned(), + name: "Vertical Drop".to_owned(), flags: vec!["--drop".to_owned()], description: "Vertical drop value (default is 2.0).".to_owned(), parameter_type: ParameterType::Float, diff --git a/whitebox-tools-app/src/tools/terrain_analysis/drainage_preserving_smoothing.rs b/whitebox-tools-app/src/tools/terrain_analysis/drainage_preserving_smoothing.rs index 4905e589f..9b9f4326d 100755 --- a/whitebox-tools-app/src/tools/terrain_analysis/drainage_preserving_smoothing.rs +++ b/whitebox-tools-app/src/tools/terrain_analysis/drainage_preserving_smoothing.rs @@ -508,7 +508,7 @@ impl WhiteboxTool for DrainagePreservingSmoothing { } } } - // calcualate the median from the histogram + // calculate the median from the histogram let mut sum = 0f64; let target = (n / 2f64).floor(); for i in 0..num_bins as usize { diff --git a/whitebox-tools-app/src/tools/terrain_analysis/embankment_mapping.rs b/whitebox-tools-app/src/tools/terrain_analysis/embankment_mapping.rs index 290c8a31f..5cfb8582a 100755 --- a/whitebox-tools-app/src/tools/terrain_analysis/embankment_mapping.rs +++ b/whitebox-tools-app/src/tools/terrain_analysis/embankment_mapping.rs @@ -21,7 +21,7 @@ use std::path; /// model (`--dem`). Fine-resolution LiDAR DEMs can represent surface features such as road and railway /// embankments with high fidelity. However, transportation embankments are problematic for several /// environmental modelling applications, including soil an vegetation distribution mapping, where the pre-embankment -/// topography is the contolling factor. The algorithm utilizes repositioned (`--search_dist`) transportation +/// topography is the controlling factor. The algorithm utilizes repositioned (`--search_dist`) transportation /// network cells, derived from rasterizing a transportation vector (`--road_vec`), as seed points in a /// region-growing operation. The embankment region grows based on derived morphometric parameters, including /// road surface width (`--min_road_width`), embankment width (`--typical_width` and `--max_width`), embankment diff --git a/whitebox-tools-app/src/tools/terrain_analysis/geomorphons.rs b/whitebox-tools-app/src/tools/terrain_analysis/geomorphons.rs index 37f45fe07..55e46f3d4 100755 --- a/whitebox-tools-app/src/tools/terrain_analysis/geomorphons.rs +++ b/whitebox-tools-app/src/tools/terrain_analysis/geomorphons.rs @@ -54,7 +54,7 @@ use nalgebra::{Vector3, Matrix3}; /// identification of a landform element regardless of its scale. /// /// An experimental feature has been added to correct for global inclination. Global inclination -/// biases the flatness threshold angle becasue it is measured relative to the z-axis, especially +/// biases the flatness threshold angle because it is measured relative to the z-axis, especially /// in locally flat areas. Including the `--residuals` flag "flattens" the input by converting /// elevation to residuals of a 2-d linear model. /// diff --git a/whitebox-tools-app/src/tools/terrain_analysis/multidirectional_hillshade.rs b/whitebox-tools-app/src/tools/terrain_analysis/multidirectional_hillshade.rs index 41df949e9..3410db967 100755 --- a/whitebox-tools-app/src/tools/terrain_analysis/multidirectional_hillshade.rs +++ b/whitebox-tools-app/src/tools/terrain_analysis/multidirectional_hillshade.rs @@ -35,7 +35,7 @@ use whitebox_common::utils::{ /// > zfactor = 1.0 / (111320.0 x cos(mid_lat)) /// /// where `mid_lat` is the latitude of the centre of the raster, in radians. The Z conversion factor can also be used -/// used to apply a vertical exageration to further emphasize landforms within the hillshade output. +/// used to apply a vertical exaggeration to further emphasize landforms within the hillshade output. /// /// The hillshade value (*HS*) of a DEM grid cell is calculate as: /// From 9c06540272f65e69a0e5155cc06365890f18b02c Mon Sep 17 00:00:00 2001 From: Souleymane Maman Nouri Souley Date: Sat, 8 Feb 2025 18:22:53 -0100 Subject: [PATCH 2/2] Fixed typos --- .vscode/tasks.json | 29 ++++++++++++------- .../src/conditioned_latin_hypercube/main.rs | 2 +- .../src/local_quadratic_regression/main.rs | 2 +- whitebox-runner/src/tool_info.rs | 4 +-- .../breach_depressions_least_cost.rs | 2 +- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e824a524e..d0a890fa3 100755 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -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 + } } ] } \ No newline at end of file diff --git a/whitebox-plugins/src/conditioned_latin_hypercube/main.rs b/whitebox-plugins/src/conditioned_latin_hypercube/main.rs index 57bc4a242..59ed52c0a 100644 --- a/whitebox-plugins/src/conditioned_latin_hypercube/main.rs +++ b/whitebox-plugins/src/conditioned_latin_hypercube/main.rs @@ -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. diff --git a/whitebox-plugins/src/local_quadratic_regression/main.rs b/whitebox-plugins/src/local_quadratic_regression/main.rs index 8c45fe047..45bfa163b 100755 --- a/whitebox-plugins/src/local_quadratic_regression/main.rs +++ b/whitebox-plugins/src/local_quadratic_regression/main.rs @@ -487,7 +487,7 @@ impl Quadratic2d { // b: Vector6 // ) -> 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 diff --git a/whitebox-runner/src/tool_info.rs b/whitebox-runner/src/tool_info.rs index 5a55d7618..b869b8b71 100644 --- a/whitebox-runner/src/tool_info.rs +++ b/whitebox-runner/src/tool_info.rs @@ -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)) @@ -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)) diff --git a/whitebox-tools-app/src/tools/hydro_analysis/breach_depressions_least_cost.rs b/whitebox-tools-app/src/tools/hydro_analysis/breach_depressions_least_cost.rs index 983a0095d..f497f02b7 100755 --- a/whitebox-tools-app/src/tools/hydro_analysis/breach_depressions_least_cost.rs +++ b/whitebox-tools-app/src/tools/hydro_analysis/breach_depressions_least_cost.rs @@ -30,7 +30,7 @@ use std::thread; /// path analysis to identify the breach channel that connects pit cells (i.e. grid cells for /// which there is no lower neighbour) to some distant lower cell. Prior to breaching and in order /// to minimize the depth of breach channels, all pit cells are raised to the elevation of the lowest -/// neighbour minus a small heigh value. Here, the cost of a breach path is determined by the amount +/// neighbour minus a small height value. Here, the cost of a breach path is determined by the amount /// of elevation lowering needed to cut the breach channel through the surrounding topography. /// /// The user must specify the name of the input DEM file (`--dem`), the output breached DEM