Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear @jblindsay
I would like to contribute to WhiteboxTools open core with a tool that generates Euclidean width raster. This is a very useful distance transformation that can be applied in any task where the typical "size" of the object or the free space between objects should be obtained. While the length is easily conceptualized as the longest dimension, the width can be tricky to estimate. This tool provides the formal and elegant approach to width estimation. For example, having the landform boundaries, you can calculate the average width of each landform.
In the image below, the
EuclideanWidth
tool is used to estimate the width of the free space between buildings — a so-called urban canyon.Since width computation is somewhat the inverse transform to the Euclidean distance, I used your
EuclideanDistance
tool as a template, then adopted it to Whitebox Plugin structure and implemented the remaining functionality. The tool has three parameters:1. Input raster (obstacles)
2. Output raster (width)
3. Maximum width [optional]
More details on the algorithm itself are in the docs.
The use of the tool is totally similar to the
EuclideanDistance
: non-zero pixels are considered target cells (obstacles), and the free space between them is filled with the width value.Looking forward on your feedback. And thanks again for developing the great Whitebox software.