opengeos / whiteboxR

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

I just tested the sample code on both Windows and Linux, and it works fine. #96

Closed KristinaNe closed 1 year ago

KristinaNe commented 1 year ago
          I just tested the sample code on both Windows and Linux, and it works fine.

Originally posted by @giswqs in https://github.com/giswqs/whiteboxR/issues/32#issuecomment-797187867

KristinaNe commented 1 year ago

i got the same error:

hillshade <- raster("brush_hillshade.tif") Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", : Cannot create a RasterLayer object from this file. (file does not exist).

I installed the latest version from github (version 2.2.0)

is there something else i can do?

I work with: R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22621)

giswqs commented 1 year ago

?

KristinaNe commented 1 year ago

Error in system(args2, intern = TRUE) : 'C:/Program' not found #32 i thought it could be something similar

giswqs commented 1 year ago

I don't see whitebox being used in your code. This is not a whitebox issue

KristinaNe commented 1 year ago

sorry, wrong column

wbt_hillshade(dem = "brushDEMsm_5m_crs.tif",

  • output = "brush_hillshade.tif",
  • azimuth = 115) hillshade - Error in system(exeargs, intern = TRUE, ignore.stderr = ignore.stderr, : '"C:/Users/krist/AppData/Local/R/win-library/4.2/whitebox/WBT/whitebox_tools.exe"' not found
brownag commented 1 year ago

Your error message is:

Error in system(exeargs, intern = TRUE, ignore.stderr = ignore.stderr, :
'"C:/Users/krist/AppData/Local/R/win-library/4.2/whitebox/WBT/whitebox_tools.exe"' not found

You will need to run install_whitebox() to install WhiteboxTools in that location before you can run the tools from R.

If you need to install to a custom directory, for example if you cannot run an executable in the "C:/Users/krist/AppData/Local/R/win-library/4.2/whitebox/WBT/" directory, see the pkg_dir argument to install_whitebox(). You can then initialize the package with options (such as custom executable path) with wbt_init().

KristinaNe commented 1 year ago

that works fine, thank you