Skip to content

Commit b10bd45

Browse files
committed
Adds the NormalizeLidar tool
Adds the NormalizeLidar tool and also adds a 'mean' option to the VectorPointsToRaster tool to resolve #330.
1 parent 6e6b9ac commit b10bd45

16 files changed

Lines changed: 709 additions & 41 deletions

File tree

.DS_Store

0 Bytes
Binary file not shown.

Cargo.lock

Lines changed: 124 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

readme.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Version 2.3.0 (XX-XX-202X)
6363
and has no dependencies (including Python). You can now open multiple tools simultaneously.
6464
- Added the IndividualTreeDetection tool for intentifying points in a LiDAR point cloud that are associated
6565
with the tops of individual trees.
66+
- Added the NormalizeLidar tool for normalizing LiDAR point clouds, i.e., converting their z-values
67+
from elevation to height-above-ground.
6668
- Added the LaunchWbRunner and InstallWbExtension tools so that the Whitebox Runner will be more
6769
accessible from other Whitebox frontends. This way users will always have a good fall-back if the
6870
frontend is not up-to-date with the WBT backend, since WbRunner is always current with the installed
@@ -79,6 +81,9 @@ Version 2.3.0 (XX-XX-202X)
7981
- Fixed a bugs in the HorizonAngle and ExposureTowardsWindFlux tools.
8082
- Added a point time interpolation parameter to the LidarNearestNeighbourGridding tool.
8183
- Added the ListUniqueValuesRaster tool.
84+
- Fixed a bug with the SetNodataValue tool, where the raster data type is updated to a signed integer
85+
if the background value is negative and the input image has an unsigned data type.
86+
- Added a 'mean' option to the VectorPointsToRaster tool.
8287

8388
Version 2.2.0 (23-10-2022)
8489
- Added the TravellingSalesmanProblem tool for identifying short routes connecting multiple locations.

whitebox-lidar/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ edition = "2021"
66

77
[dependencies]
88
byteorder = "^1.3.1"
9-
chrono = "0.4.15"
10-
las = { version = "0.7.8", features = ["laz"] }
9+
chrono = "0.4.21"
10+
las = { version = "0.8.0", features = ["laz"] }
1111
miniz_oxide = "0.3.6"
1212
zip = "0.3.0"
1313
brotli = "3.3.0"

whitebox-lidar/src/las.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2886,7 +2886,7 @@ impl LasFile {
28862886

28872887
if !self.file_name.to_lowercase().ends_with(".zip")
28882888
&& !self.file_name.to_lowercase().ends_with(".zlidar")
2889-
&& !self.file_name.to_lowercase().ends_with(".las")
2889+
&& !self.file_name.to_lowercase().ends_with(".laz")
28902890
{
28912891
let f = File::create(&self.file_name)?;
28922892
let mut writer = BufWriter::new(f);

whitebox-plugins/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ path = "src/local_quadratic_regression/main.rs"
5252
name = "max_upslope_value"
5353
path = "src/max_upslope_value/main.rs"
5454

55+
[[bin]]
56+
name = "normalize_lidar"
57+
path = "src/normalize_lidar/main.rs"
58+
5559
[[bin]]
5660
name = "qin_flow_accumulation"
5761
path = "src/qin_flow_accumulation/main.rs"

whitebox-plugins/src/individual_tree_detection/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ use std::thread;
2424

2525
/// This tool can be used to identify points in a LiDAR point cloud that are associated with the tops of individual trees. The
2626
/// tool takes a LiDAR point cloud as an input (`input_lidar`) and it is best if the input file has been normalized using the
27-
/// `lidar_tophat_transform` function, such that points record height above the ground surface. Note that the `input_file`
27+
/// `lidar_tophat_transform` function, such that points record height above the ground surface. Note that the `input`
2828
/// parameter is optional and if left unspecified the tool will search for all valid LiDAR (*.las, *.laz, *.zlidar) files
2929
/// contained within the current working directory. This 'batch mode' operation is common among many of the LiDAR processing
3030
/// tools. Output vectors are saved to disc automatically for each processed LiDAR file when operating in batch mode.
3131
///
3232
/// The tool will evaluate the points within a local neighbourhood around each point in the input point cloud and determine
3333
/// if it is the highest point within the neighbourhood. If a point is the highest local point, it will be entered into the
34-
/// output vector file (`output_file`). The neighbourhood size can vary, with higher canopy positions generally associated with larger
34+
/// output vector file (`output`). The neighbourhood size can vary, with higher canopy positions generally associated with larger
3535
/// neighbourhoods. The user specifies the `min_search_radius` and `min_height` parameters, which default to 1 m and 0 m
3636
/// respectively. If the `min_height` parameter is greater than zero, all points that are less than this value above the
3737
/// ground (assuming the input point cloud measures this height parameter) are ignored, which can be a useful mechanism
@@ -88,8 +88,8 @@ fn help() {
8888
version Prints the tool version information.
8989
9090
The following flags can be used with the 'run' command:
91-
-i, --input_file Name of the input LiDAR file.
92-
-o, --output_file Name of the output vector points file.
91+
-i, --input Name of the input LiDAR file.
92+
-o, --output Name of the output vector points file.
9393
--min_search_radius Minimum search radius (m).
9494
--min_height Minimum height (m).
9595
--max_search_radius Maximum search radius (m).

0 commit comments

Comments
 (0)