whitebox-tools
whitebox-tools copied to clipboard
RasterCalculator python implementation "Unrecognized tool name"
Running the following wbt.raster_calculator(output, statement="", )
gives this feedback and error:
.\whitebox_tools.exe --run="RasterCalculator" --statement= --output='output.tif' -v --compress_rasters=False
thread 'main' panicked at 'Unrecognized tool name RasterCalculator.', whitebox-tools-app\src\main.rs:72:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I'm able to run the same tool/statement from the command line without issue. I'm able to run other python wbt functions without issue.
Not sure if this is related to the documentation issue here.
Many Thanks,
still not working in v2.2.0
still not working in v2.3.0
I've just tested it and the tool works fine:
from WBT.whitebox_tools import WhiteboxTools
wbt = WhiteboxTools()
wbt.work_dir = '/Users/johnlindsay/Documents/research/Papers/Geomorphometry in Whitebox/data'
wbt.raster_calculator('new.tif', '"reunion_1m.tif" != 400.0')
Produces the output:
(.venv) johnlindsay@Johns-MacBook-Pro python % python test11.py ./whitebox_tools --run="RasterCalculator" --wd="/Users/johnlindsay/Documents/research/Papers/Geomorphometry in Whitebox/data" --statement="reunion_1m.tif" != 400.0 --output='new.tif' -v --compress_rasters=False
- Welcome to RasterCalculator *
- Powered by WhiteboxTools *
- www.whiteboxgeo.com *
Reading data... Reading data: 0% Progress: 1% Progress: 2% Progress: 3% Progress: 4% Progress: 5% Progress: 6% Progress: 7% Progress: 8% Progress: 9% Progress: 10% Progress: 11% Progress: 12% Progress: 13% Progress: 14% Progress: 15% Progress: 16% Progress: 17% Progress: 18% Progress: 19% Progress: 20% Progress: 21% Progress: 22% Progress: 23% Progress: 24% Progress: 25% Progress: 26% Progress: 27% Progress: 28% Progress: 29% Progress: 30% Progress: 31% Progress: 32% Progress: 33% Progress: 34% Progress: 35% Progress: 36% Progress: 37% Progress: 38% Progress: 39% Progress: 40% Progress: 41% Progress: 42% Progress: 43% Progress: 44% Progress: 45% Progress: 46% Progress: 47% Progress: 48% Progress: 49% Progress: 50% Progress: 51% Progress: 52% Progress: 53% Progress: 54% Progress: 55% Progress: 56% Progress: 57% Progress: 58% Progress: 59% Progress: 60% Progress: 61% Progress: 62% Progress: 63% Progress: 64% Progress: 65% Progress: 66% Progress: 67% Progress: 68% Progress: 69% Progress: 70% Progress: 71% Progress: 72% Progress: 73% Progress: 74% Progress: 75% Progress: 76% Progress: 77% Progress: 78% Progress: 79% Progress: 80% Progress: 81% Progress: 82% Progress: 83% Progress: 84% Progress: 85% Progress: 86% Progress: 87% Progress: 88% Progress: 89% Progress: 90% Progress: 91% Progress: 92% Progress: 93% Progress: 94% Progress: 95% Progress: 96% Progress: 97% Progress: 98% Progress: 99% Progress: 100% Saving data... Output file written
Elapsed Time (Including I/O): 2.378s (.venv) johnlindsay@Johns-MacBook-Pro python %
I don't think that this is a backend issue. Perhaps you are using an alternative Python API frontend for WhiteboxTools and the issue lies there.