opengeos / whiteboxR

WhiteboxTools R Frontend
https://whiteboxR.gishub.org
Other
168 stars 30 forks source link

working with compressed data and predictors #85

Closed wiesehahn closed 1 year ago

wiesehahn commented 1 year ago

I tried to run wbt_feature_preserving_smoothing() on a raster which was compressed by DEFLATE with Predictor = 2 (e.g. by terra::writeRaster(dem, "dem.tif", gdal=c("COMPRESS=DEFLATE", "PREDICTOR=2")).

I get a result but just for some pixels at the border and hence its not usable.

When I try to run it on a raster with Predictor = 3, I receive Reading data... thread 'main' panicked at 'The GeoTIFF reader does not currently support floating-point predictors (PREDICTOR=3).', whitebox-tools-app\src\main.rs:72:21

So I guess my case is either a different problem or its not supported as well and the error message is missing?!

giswqs commented 1 year ago

@wiesehahn whiteboxR is just a frontend wapper of WhiteboxTools. As long as the R function runs and produces results, then it is not a whiteboxR problem. WBT does not support all kinds of GeoTIFFs. I would suggest converting your input to a non-compressed GeoTIFF. If you are still experiencing issues, then I would suggest you open an issue on the WBT repo https://github.com/jblindsay/whitebox-tools/issues

brownag commented 1 year ago

See response in https://github.com/giswqs/whiteboxR/issues/71 for some links to similar issues on the main whitebox-tools repo