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

Add EuclideanWidth tool #363

Open
wants to merge 3 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
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added doc_img/EuclideanWidth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions whitebox-plugins/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "whitebox_plugins"
version = "2.3.0"
authors = ["John Lindsay <[email protected]>"]
authors = ["John Lindsay <[email protected]>", "Timofey Samsonov <[email protected]>"]
edition = "2021"

[[bin]]
Expand All @@ -24,6 +24,10 @@ path = "src/exposure_towards_wind_flux/main.rs"
name = "extract_by_attribute"
path = "src/extract_by_attribute/main.rs"

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

[[bin]]
name = "gaussian_scale_space"
path = "src/gaussian_scale_space/main.rs"
Expand Down Expand Up @@ -103,6 +107,7 @@ kd-tree = { version = "0.4.1", features = ["rayon"] }
kdtree = "0.6.0"
nalgebra = "0.18.0"
num_cpus = "1.13.0"
ordered-float = "3.7.0"
rand = { version = "0.7", features = ["small_rng"] }
rayon = "1.7.0"
rstar = "0.9.3"
Expand All @@ -111,4 +116,4 @@ typenum = "1.15.0"
whitebox_common = { path = "../whitebox-common" }
whitebox_lidar = { path = "../whitebox-lidar" }
whitebox_raster = { path = "../whitebox-raster" }
whitebox_vector = { path = "../whitebox-vector" }
whitebox_vector = { path = "../whitebox-vector" }
34 changes: 34 additions & 0 deletions whitebox-plugins/src/euclidean_width/euclidean_width.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"tool_name": "EuclideanWidth",
"exe": "euclidean_width",
"short_description": "Calculates width of the free space between obstacles",
"toolbox": "GIS Analysis/Distance Tools",
"license": "MIT",
"example": ".*EXE_NAME -r=EuclideanWidth -i=input.tif -o=width.tif --max_width=1000.0",
"parameters": [
{
"name": "Input Raster File",
"flags": ["-i", "--input"],
"description": "Input raster file.",
"parameter_type": {"ExistingFile":"Raster"},
"default_value": null,
"optional": false
},
{
"name": "Output Raster File",
"flags": ["-o", "--output"],
"description": "Output raster file.",
"parameter_type": {"NewFile":"Raster"},
"default_value": null,
"optional": false
},
{
"name": "Maximum width",
"flags": ["--max_width"],
"description": "Maximum width for high-precision calculation",
"parameter_type": "Float",
"default_value": null,
"optional": true
}
]
}
Loading