I understand the philosophy of WhiteBox Tools (one command for one process) but am wondering how best to use its math tools to create a slightly more complicated function.

E.g., (A/B + C/D)

I'm creating band ratios as given on the Remote Sensing index database which sometimes require functions that are more complex than the functions of Mathematical and Statistical Analysis (e.g., divide two rasters and output a TIF, add two rasters and output a TIF, etc..).

I don't want to simply load by 10 or 15 bands into memory and work with them via numpy; WhiteBox is nice because it just loads the rasters required, when necessary.

  • 1
    Maybe try something like: wbt.Divide(A, B, AB); wbt.Divide(C, D, CD); wbt.Add(AB, CD). See the math and stats tools and the usage docs. – user2856 Jan 22 '19 at 4:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.