Error in wbt_lidar_tile_footprint(wd = in_las) : argument "input" is missing, with no default

21 views
Skip to first unread message

Norris lam

unread,
Oct 2, 2023, 9:18:22 AM10/2/23
to WhiteboxTools
Hi,

I am trying to use WBT open core with R and what I want to do is generate lidar tile footprints for an entire folder of las files.

When the input/output parameters are not specified, the tool works with all LAS files contained within the working directory.

But when I use this code where  I dont specify the input and output (in_las is the folder path)

wbt_lidar_tile_footprint(hull = FALSE, wd =in_las )

I get this error:
Error in wbt_lidar_tile_footprint() : argument "input" is missing, with no default

When I specify a single las tile, the command works without issue. for ex.
wbt_lidar_tile_footprint(i = las_fname_fullpath[1], o = out_shp, hull = FALSE, wd =in_las)

Its only when I dont specify the input folder where I get the issue.

I also tried specifying the folder as input and got this error in the console. Basically says permssion is denied but in swedish.
********************************* * Welcome to LidarTileFootprint * * Powered by WhiteboxTools * * www.whiteboxgeo.com * ********************************* reading input LiDAR file... Performing analysis... Error reading file D:/temp/Baskarta/lidar/: Åtkomst nekad. (os error 5) Progress (1 of 1): 0% thread 'main' panicked at 'Error opening LAS file.: Os { code: 5, kind: PermissionDenied, message: "Åtkomst nekad." }', whitebox-lidar\src\las.rs:532:57 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Can someone provide an example of how the code should look like to process an entire input folder?
Thanks!
Norris

Norris lam

unread,
Oct 4, 2023, 4:12:36 AM10/4/23
to WhiteboxTools
For anyone coming from the future.
I found the easiest way is to send the command via system function in R.

Example of code that worked perfectly for me is:

wbt_exe_path <- r"{C:/ProgramData/WBT/whitebox_tools.exe}"

wbt_cmd <- r"{LidarTileFootprint}"
wd_path     <- r"{D://lidar/}"
out_path     <- r"{D:/lidar/footprint.shp}"

batchline <- sprintf("%s -r=%s -v --wd=%s -o=%s", wbt_exe_path, wbt_cmd, wd_path, out_path)
print(batchline)
system(batchline)
Reply all
Reply to author
Forward
0 new messages