Skip to content

Add EuclideanWidth tool#363

Open
tsamsonov wants to merge 3 commits intojblindsay:masterfrom
tsamsonov:euclideanwidth
Open

Add EuclideanWidth tool#363
tsamsonov wants to merge 3 commits intojblindsay:masterfrom
tsamsonov:euclideanwidth

Conversation

@tsamsonov
Copy link
Copy Markdown
Contributor

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.

EuclideanWidth

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant