whitebox-tools
whitebox-tools copied to clipboard
Inconsistent output from D8_pointer.
Hello, I'm having trouble with the D8_pointer function (python API). Specifically that running the function with the same inputs does not return a consistent output. I noticed when one of my system tests failed, so I ran the D8_pointer function multiple times with the same inputs and compared the outputs. The same pixel changed each time, alternating between the same two values at each run. This has knock-on effects for the flow_accumulation dataset I produce afterwards. As I was investigating this I realised that the breach_depressions_least_cost method had actually expanded the input DEM by a margin of 2 or 3 pixels. It is in this margin that the inconsistency is happening. Is this a known quirk, or a bug?
Thanks
As far as I know, the D8 algorithm should always give the same result for the same input raster as there is no randomness in it. The fact that you have a alternating two values for the same pixel is really strange.
You should post the code and WBT version you used along with a link to download your data in order to get more help.
Hello @InsolublePancake ,
@jfbourdon is correct. There is no randomness within the D8 algorithm. It should produce the same output every time. As for the issue with the BreachDepressionsLeastCost.. I was unable to re-produce your issue on a personal test dataset. Could you possible share the dataset you are working with? Provide some more detail regarding the parameters you were using?