r-spatial / link2GI

Simplify the linking of GIS/RS and CLI tools
https://r-spatial.github.io/link2GI
GNU General Public License v3.0
25 stars 7 forks source link

linkSAGA() searchLocation produces error #61

Closed konstantinengelmayer closed 4 months ago

konstantinengelmayer commented 10 months ago

Hi,

the linkSAGA()-function isn´t able to find saga. When setting a searchLocation following error occurs:

> sagaLink <- link2GI::linkSAGA(searchLocation = "C:/OSGeo4W/apps/saga9")

Warning: stack imbalance in 'lapply', 9 then 11 Error in system(paste0(paste0(shQuote(paths), sep, scmd), " --version"), : '""\saga_cmd.exe' not found In addition: Warning messages: 1: In grep(paste("OSGeo4W64", collapse = "|"), rawSAGA[i], value = TRUE) : unable to translate 'Parameterformat nicht ordnungsgem<84> - "o4W".' to a wide string 2: In grep(paste("OSGeo4W64", collapse = "|"), rawSAGA[i], value = TRUE) : input string 1 is invalid 3: In grep(paste("OSGeo4W", collapse = "|"), rawSAGA[i], value = TRUE) : unable to translate 'Parameterformat nicht ordnungsgem<84> - "o4W".' to a wide string 4: In grep(paste("OSGeo4W", collapse = "|"), rawSAGA[i], value = TRUE) : input string 1 is invalid 5: In grep(paste("QGIS", collapse = "|"), rawSAGA[i], value = TRUE) : unable to translate 'Parameterformat nicht ordnungsgem<84> - "o4W".' to a wide string 6: In grep(paste("QGIS", collapse = "|"), rawSAGA[i], value = TRUE) : input string 1 is invalid 7: In gregexpr(pattern = "saga_cmd.exe", rawSAGA[i]) : unable to translate 'Parameterformat nicht ordnungsgem<84> - "o4W".' to a wide string 8: In gregexpr(pattern = "saga_cmd.exe", rawSAGA[i]) : input string 1 is invalid

R version 4.3.1 (2023-06-16 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19045)

gisma commented 10 months ago

Thanks for pointing out. It is more tricky than I thought. It needs I deeper redesign due to some conceptual changes. I ll work ln it.