mapme-initiative/mapme.vegetation

scl_buffer does not give an informative error when path to GRASS bin is not correct

Opened this issue · 2 comments

scl_buffer needs to error out and give an informative message in case that not valid GRASS binary is found

I'm also stuck with the scl_buffer now. But I'm not sure if my error is related to GRASS or more to GDAL

scl_buffer(scl_files = scl_files, 
+            mask_values = c(1,2,3,7,8,9,10,11), # which values to mask?
+            mask_buffer = 100, 
+            grass_bin = "C:/OSGeo4W64/apps/grass/grass79", 
+            threads = 1, 
+            outdir = "C:/SOM-Togdheer/R-programs/CM_S2A")
  |                                                             |   0%Error in system(rcl_command, intern = T) : 
  'CreateProcess' failed to run 'C:\OSGEO4~1\apps\gdal2\pymod3\scripts\GDAL_C~1.PY -A C:/SOM-Togdheer/R-programs/S2A/S2A_38PMR_20220904_0_L2A_SCL.tif --outfile=C:\Users\stp.CES\AppData\Local\Temp\Rtmpy2M6cL\file4db4395f70c8.tif --calc="1*(A==1)+1*(A==2)+1*(A==3)+1*(A==7)+1*(A==8)+1*(A==9)+1*(A==10)+1*(A==11)"'

I already updated my PATH to include the path to the gdal scripts but now it fails to run

This is a problem with GDAL. I moved your comment to a new issue. Let's continue the discussion there.