jblindsay / whitebox-tools

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

Deviation From Mean Elevation and Maximum elevation deviation are probably not working correctly #149

Closed zm8597 closed 3 years ago

zm8597 commented 3 years ago

Greetings,

We are developing RVT (Relief Visualization Toolbox) in Python and we would like to add your Multi-scale topographic position (MSTP) visualization to it. When we tried to program MSTP in python we ran into some issues. As we compared our results with Whitebox we found out that Deviation From Mean Elevation (DEV) and Maximum elevation deviation (DEV MAX) are probably not working as they should. We have tried convolutional kernel filter approach and summed area table approach. Results were always the same but different compared to the results from Whitebox. We used formulas from your article: DEV(D) = (z0 - zmD) / sD, where D is radius of kernel, z0 is center pixel value, zmD is mean of all kernel values, sD is standard deviation of kernel. We have also calculated DEV in ArcGIS Pro with focal statistic and raster calculator, and got similar results as in Python but diffrent than in Whitebox. You can check our python code here (https://github.com/EarthObservation/RVT_py/blob/master/rvt/vis.py#L1602). I am also attaching some calculated samples of DEV calculated with Python, ArcGIS Pro and Whitebox (radius=5, DEM="test.tif"): tst_DEV_rad5.zip

Best regards, Žiga Maroh

jblindsay commented 3 years ago

Hello Žiga, I'm afraid that this is probably not the best outlet for this correspondence, since this is only intended for reporting issues (i.e. bugs) with WBT. I'm closing this now. Please feel free to repost your question either on the Google Groups forum or email support@whiteboxgeo.com directly. Thank you kindly.

jblindsay commented 3 years ago

It looks like I was too quick to close this issue and so I'm re-opening it now. I'm at a particularly busy period at the end of my semester, but will hopefully have more time to look into this soon.

zm8597 commented 3 years ago

Sorry to be a bother. I misunderstood Whitebox GAT with WhiteboxTools. I have tested everything with WhiteboxTools and I have got the expected output. All the best.