Internal function to load the paths of executables from the JSON where they are saved when installed.

load_binpaths(bins = NULL)

Arguments

bins

Character vector with one of more of the following values: "gdal", sen2cor", "aria2", "python". If an executable corresponding to the passed bins value is not found in the JSON, it is checked (when possible).

Value

The list of the paths

Note

License: GPL 3.0

Examples

# \donttest{ # Load only existing paths binpaths <- load_binpaths() binpaths
#> $gdalinfo #> [1] "/usr/bin/gdalinfo" #> #> $ogrinfo #> [1] "/usr/bin/ogrinfo" #> #> $gdal_translate #> [1] "/usr/bin/gdal_translate" #> #> $gdalwarp #> [1] "/usr/bin/gdalwarp" #> #> $gdalbuildvrt #> [1] "/usr/bin/gdalbuildvrt" #> #> $gdaldem #> [1] "/usr/bin/gdaldem" #> #> $gdal_calc #> [1] "/usr/bin/gdal_calc.py" #> #> $gdal_polygonize #> [1] "/usr/bin/gdal_polygonize.py" #> #> $gdal_fillnodata #> [1] "/usr/bin/gdal_fillnodata.py" #> #> $aria2c #> [1] "/usr/bin/aria2c" #> #> $python #> [1] "/usr/bin/python3.7" #> #> attr(,"path") #> [1] "~/.sen2r/paths.json"
# } if (FALSE) { # Load paths, forcing to check GDAL and sen2cor binpaths <- load_binpaths(c("gdal", "sen2cor")) binpaths }