Skip to content

Commit

Permalink
max and nodata edit
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbourdon committed Jan 10, 2023
1 parent 5545321 commit 28a724f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion whitebox-tools-app/src/tools/gis_analysis/reclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use std::thread;
///
/// Here, 0.0 is assigned to input grid cell values of 1.0 and 1.0 is output for all input cells with a value of 2.0. Users
/// may add the text strings *min* and *max* in the class definitions to stand in for the raster's minimum and maximum values.
/// Using *max* in a class triplet will change this class from *To Just Less Than* to *To Less Or Equal Than*.
/// For example:
///
/// > --reclass_vals='0.0;min;1.0;1.0;1.0;max'
Expand Down Expand Up @@ -255,7 +256,9 @@ impl WhiteboxTool for Reclass {
if s.to_lowercase().contains("min") {
min_val
} else if s.to_lowercase().contains("max") {
max_val
max_val + 0.1f64
} else if s.to_lowercase().contains("nodata") {
nodata
} else {
s.trim().parse().unwrap()
}
Expand Down

0 comments on commit 28a724f

Please sign in to comment.