Skip to content

Commit

Permalink
Release of v2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jblindsay committed Mar 28, 2023
1 parent b10bd45 commit 4208336
Show file tree
Hide file tree
Showing 42 changed files with 2,890 additions and 267 deletions.
Binary file modified .DS_Store
Binary file not shown.
439 changes: 348 additions & 91 deletions Cargo.lock

Large diffs are not rendered by default.

Binary file added WhiteboxTools_darwin_m_series.zip
Binary file not shown.
Binary file added doc_img/IndividualTreeDetection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_img/NormalizeLidar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc_img/WBRunner.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_img/WbRunner_light_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_img/WhiteboxToolsLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 14 additions & 10 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,23 @@ for more details.
* Release Notes: *
******************

Version 2.3.0 (XX-XX-202X)
- Added the new Whitebox Runner v2.0. This is a whole new program with many advancements over the
previous version of the WbRunner. It is now written in pure Rust (compared with the old Python
TkInter app) using the egui user-interface library. It has a more modern feel, is cross-platform,
and has no dependencies (including Python). You can now open multiple tools simultaneously.
- Added the IndividualTreeDetection tool for intentifying points in a LiDAR point cloud that are associated
with the tops of individual trees.
- Added the NormalizeLidar tool for normalizing LiDAR point clouds, i.e., converting their z-values
from elevation to height-above-ground.
Version 2.3.0 (30-03-2023)
- Added the new Whitebox Runner v2.0. This version of WbRunner is an entirely new application with many
advancements over the previous version of the WbRunner. It is now written in pure Rust (compared with
the old Python TkInter app) using the egui user-interface library. It has a more modern feel, is
cross-platform, and has no dependencies (including Python). You can now open multiple tools simultaneously.
- WbRunner is now the preferred way now for installing the Whitebox Toolset Extension (WTE).
- Added the LaunchWbRunner and InstallWbExtension tools so that the Whitebox Runner will be more
accessible from other Whitebox frontends. This way users will always have a good fall-back if the
frontend is not up-to-date with the WBT backend, since WbRunner is always current with the installed
version of WBT. Also, the WbRunner is the preferred way now for installing Whitebox extensions.
version of WBT.
- Added the IndividualTreeDetection tool for identifying points in a LiDAR point cloud that are associated
with the tops of individual trees.
- Added the NormalizeLidar tool for normalizing LiDAR point clouds, i.e., converting their z-values
from elevation to height-above-ground.
- Natural Resources Canada (NRCan) has sponsored the open-sourcing of two tools contained in the extension,
VectorStreamNetworkAnalysis and RepairStreamVectorTopology. These two tools are are now available in the
WbT Open Core.
- Fixed a bug with the LidarShift tool. The tool was calculating the shift in transformed coordinates
incorrectly leading to very strange outputs.
- The MultiscaleTopographicPositionImage tool now takes an optional hillshade image as input.
Expand Down
6 changes: 1 addition & 5 deletions versioning_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"wbtVersion": "2.2.0",
"wbtVersion": "2.3.0",
"gteTools": [
"AccumulationCurvature",
"AssessRoute",
Expand Down Expand Up @@ -49,7 +49,6 @@
"RecreatePassLines",
"RemoveFieldEdgePoints",
"RemoveRasterPolygonHoles",
"RepairStreamVectorTopology",
"RingCurvature",
"RiverCenterlines",
"Rotor",
Expand All @@ -64,7 +63,6 @@
"SvmRegression",
"TopographicPositionAnimation",
"Unsphericity",
"VectorStreamNetworkAnalysis",
"VerticalExcessCurvature",
"YieldFilter",
"YieldMap",
Expand All @@ -85,7 +83,6 @@
"LowPointsOnHeadwaterDivides",
"MultiscaleCurvatures",
"Openness",
"RepairStreamVectorTopology",
"RingCurvature",
"RiverCenterlines",
"Rotor",
Expand All @@ -96,7 +93,6 @@
"SmoothVegetationResidual",
"TopographicPositionAnimation",
"Unsphericity",
"VectorStreamNetworkAnalysis",
"VerticalExcessCurvature"
],
"lidarTools": [
Expand Down
12 changes: 6 additions & 6 deletions whitebox-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[package]
name = "whitebox_common"
version = "2.0.0"
version = "2.3.0"
authors = ["John Lindsay <[email protected]>"]
edition = "2021"

[dependencies]
byteorder = "^1.3.1"
nalgebra = "0.18.0"
byteorder = "^1.4.3"
nalgebra = "0.32.2"
num-traits = "0.2.14"
rand = { version = "0.7", features = ["small_rng"] }
rstar = "0.7.1"
serde = { version = "1.0.123", features = ["derive"] }
serde_json = "1.0.64"
rstar = "0.10.0"
serde = { version = "1.0.158", features = ["derive"] }
serde_json = "1.0.94"

[build-dependencies]
rustc_version = "0.3.3"
6 changes: 5 additions & 1 deletion whitebox-common/src/structures/radial_basis_function.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
//! Based on rbf-interp, a library for multidimensional interpolation.
//! by Raph Levien (raphlinus)
//! https://github.com/linebender/rbf-interp/blob/master/src/lib.rs
use nalgebra::{DMatrix, DVector, SVD};
use nalgebra::{
DMatrix,
DVector,
SVD
};

#[derive(Clone, Copy)]
pub enum Basis {
Expand Down
64 changes: 32 additions & 32 deletions whitebox-common/src/structures/rectangle_with_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,39 +60,39 @@ impl<T> PointDistance for RectangleWithData<T> {
}
}

#[cfg(test)]
mod test {
use super::RectangleWithData;
use crate::rstar::{PointDistance, RTree};
// #[cfg(test)]
// mod test {
// use super::RectangleWithData;
// use crate::rstar::{PointDistance, RTree};

#[test]
fn rectangle_distance() {
let rectangle = RectangleWithData::new(1, [0.5, 0.5], [1.0, 2.0]);
let small_val = 0.00001;
assert!((rectangle.distance_2(&[0.5, 0.5]) - 0.0) < small_val);
assert!((rectangle.distance_2(&[0.0, 0.5]) - 0.5 * 0.5) < small_val);
assert!((rectangle.distance_2(&[0.5, 1.0]) - 0.0) < small_val);
assert!((rectangle.distance_2(&[0.0, 0.0]) - 0.5) < small_val);
assert!((rectangle.distance_2(&[0.0, 1.0]) - 0.5 * 0.5) < small_val);
assert!((rectangle.distance_2(&[1.0, 3.0]) - 1.0) < small_val);
assert!((rectangle.distance_2(&[1.0, 1.0]) - 0.0) < small_val);
}
// #[test]
// fn rectangle_distance() {
// let rectangle = RectangleWithData::new(1, [0.5, 0.5], [1.0, 2.0]);
// let small_val = 0.00001;
// assert!((rectangle.distance_2(&[0.5, 0.5]) - 0.0) < small_val);
// assert!((rectangle.distance_2(&[0.0, 0.5]) - 0.5 * 0.5) < small_val);
// assert!((rectangle.distance_2(&[0.5, 1.0]) - 0.0) < small_val);
// assert!((rectangle.distance_2(&[0.0, 0.0]) - 0.5) < small_val);
// assert!((rectangle.distance_2(&[0.0, 1.0]) - 0.5 * 0.5) < small_val);
// assert!((rectangle.distance_2(&[1.0, 3.0]) - 1.0) < small_val);
// assert!((rectangle.distance_2(&[1.0, 1.0]) - 0.0) < small_val);
// }

#[test]
fn rectangle_locate_all_at_point() {
let tree = RTree::bulk_load(vec![
RectangleWithData::new(1, [0.0, 0.0], [2.0, 2.0]),
RectangleWithData::new(2, [1.0, 1.0], [3.0, 3.0]),
RectangleWithData::new(3, [2.5, 2.5], [4.0, 4.0]),
]);
// #[test]
// fn rectangle_locate_all_at_point() {
// let tree = RTree::bulk_load(vec![
// RectangleWithData::new(1, [0.0, 0.0], [2.0, 2.0]),
// RectangleWithData::new(2, [1.0, 1.0], [3.0, 3.0]),
// RectangleWithData::new(3, [2.5, 2.5], [4.0, 4.0]),
// ]);

assert_eq!(tree.locate_all_at_point(&[1.5, 1.5]).count(), 2);
assert_eq!(tree.locate_all_at_point(&[0.0, 0.0]).count(), 1);
assert_eq!(tree.locate_all_at_point(&[-1., 0.0]).count(), 0);
assert_eq!(tree.locate_all_at_point(&[2.6, 2.6]).count(), 2);
// assert_eq!(tree.locate_all_at_point(&[1.5, 1.5]).count(), 2);
// assert_eq!(tree.locate_all_at_point(&[0.0, 0.0]).count(), 1);
// assert_eq!(tree.locate_all_at_point(&[-1., 0.0]).count(), 0);
// assert_eq!(tree.locate_all_at_point(&[2.6, 2.6]).count(), 2);

let ret = tree.locate_all_at_point(&[1.5, 1.5]).collect::<Vec<_>>();
assert_eq!(ret[0].data, 2);
assert_eq!(ret[1].data, 1);
}
}
// let ret = tree.locate_all_at_point(&[1.5, 1.5]).collect::<Vec<_>>();
// assert_eq!(ret[0].data, 2);
// assert_eq!(ret[1].data, 1);
// }
// }
4 changes: 2 additions & 2 deletions whitebox-lidar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "whitebox_lidar"
version = "2.0.0"
version = "2.3.0"
authors = ["John Lindsay <[email protected]>"]
edition = "2021"

[dependencies]
byteorder = "^1.3.1"
byteorder = "^1.4.3"
chrono = "0.4.21"
las = { version = "0.8.0", features = ["laz"] }
miniz_oxide = "0.3.6"
Expand Down
12 changes: 11 additions & 1 deletion whitebox-plugins/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "whitebox_plugins"
version = "2.0.0"
version = "2.3.0"
authors = ["John Lindsay <[email protected]>"]
edition = "2021"

Expand Down Expand Up @@ -68,6 +68,10 @@ path = "src/quinn_flow_accumulation/main.rs"
name = "raster_calculator"
path = "src/raster_calculator/main.rs"

[[bin]]
name = "repair_stream_vector_topology"
path = "src/repair_stream_vector_topology/main.rs"

[[bin]]
name = "rho8_flow_accumulation"
path = "src/rho8_flow_accumulation/main.rs"
Expand All @@ -80,12 +84,18 @@ path = "src/split_vector_lines/main.rs"
name = "travelling_salesman_problem"
path = "src/travelling_salesman_problem/main.rs"

[[bin]]
name = "vector_stream_network_analysis"
path = "src/vector_stream_network_analysis/main.rs"

[dependencies]
fasteval = "0.2.4"
kd-tree = { version = "0.4.1", features = ["rayon"] }
kdtree = "0.6.0"
nalgebra = "0.18.0"
num_cpus = "1.13.0"
rand = { version = "0.7", features = ["small_rng"] }
rstar = "0.9.3"
tsp-rs = "0.1.0"
typenum = "1.15.0"
whitebox_common = { path = "../whitebox-common" }
Expand Down
6 changes: 4 additions & 2 deletions whitebox-plugins/src/individual_tree_detection/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::thread;

/// This tool can be used to identify points in a LiDAR point cloud that are associated with the tops of individual trees. The
/// tool takes a LiDAR point cloud as an input (`input_lidar`) and it is best if the input file has been normalized using the
/// `lidar_tophat_transform` function, such that points record height above the ground surface. Note that the `input`
/// `NormalizeLidar` or `LidarTophatTransform` tools, such that points record height above the ground surface. Note that the `input`
/// parameter is optional and if left unspecified the tool will search for all valid LiDAR (*.las, *.laz, *.zlidar) files
/// contained within the current working directory. This 'batch mode' operation is common among many of the LiDAR processing
/// tools. Output vectors are saved to disc automatically for each processed LiDAR file when operating in batch mode.
Expand All @@ -46,8 +46,10 @@ use std::thread;
/// simply set the `only_use_veg` parameter to True. This parameter should only be set to True when you know that the
/// input file contains point classifications, otherwise the tool may generate an empty output vector file.
///
/// ![](../../doc_img/IndividualTreeDetection.png)
///
/// # See Also
/// `LidarTophatTransform`
/// `NormalizeLidar`, `LidarTophatTransform`
fn main() {
let args: Vec<String> = env::args().collect();

Expand Down
2 changes: 2 additions & 0 deletions whitebox-plugins/src/normalize_lidar/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ use std::thread;
/// results in some cases, the `NormalizeLidar` tool likely works better under more rugged topography and in areas with
/// extensive building coverage, and provides greater control over the definition of the ground surface.
///
/// ![](../../doc_img/NormalizeLidar.png)
///
/// # See Also
/// `LidarTophatTransform`, `IndividualTreeDetection`, `LidarGroundPointFilter`, `ClassifyLidar`
fn main() {
Expand Down
Loading

0 comments on commit 4208336

Please sign in to comment.