jblindsay / whitebox-tools

An advanced geospatial data analysis platform
https://www.whiteboxgeo.com/
MIT License
967 stars 161 forks source link

BreachDepressionsLeastCost 4-cell connected #297

Open cefect opened 2 years ago

cefect commented 2 years ago

Thanks for the awesome tool.

My tests show that BreachDepressionsLeastCost uses 8-cell connectedness: image

It would be awesome if there was an option for 4-cell to align with some hydrodynamic model behavior. In the meantime, if you have any alternates to suggest these would be appreciated.

jblindsay commented 2 years ago

Looking at the image above, I must admit that I don't see the issue. How is 8-cell connectedness a problem? Can you provide an example perhaps? The issue with 4-cell connectedness is that breach paths will necessarily take on a very unnatural zig-zagging pattern. I think I could probably implement this feature, but the question is, do the benefits outweigh the downsides, i.e. the zig-zag breaching pattern and the additional parameter on a tool that already contains a large number of parameters.

cefect commented 2 years ago

Thank you for the reply and apologies for the confusion. The question is not which is preferable, but the application of the DEM. I am conditioning for a LISFLOOD model which uses 4 cell connectedness. I agree It would be nice if LISFLOOD used 8 cell, but it does not. Therefore, I need a conditioning tool which supports 4 cell. I assume there are others in a similar position, also… adding this as another parameter actually brings more clarity to the tool (I don’t think the connectedness is mentioned in the documentation).