Me again.
Seems like currently the Grass functions are not working as expected.
devtools::install_github("mapme-initiative/mapme.forest")
library(sf)
library(mapme.forest)
library(raster)
## TEST DOWNLOAD
# read in polygons of interest
aoi = st_read(system.file("extdata", "aoi_polys.gpkg", package = "mapme.forest"))
# download GFW data for the area of interest
raster_files = downloadGFW(shape = aoi,
basename = "pkgTest",
dataset = "GFC-2020-v1.8",
outdir = "../../johannes/data/",
keepTmpFiles = T)
# in case the projection between aoi and the downloaded rasters is different,
treeCover = "../../johannes/data/pkgTest_treecover2000.tif"
lossYear = "../../johannes/data/pkgTest_lossyear.tif"
co2Layer = "../../johannes/data/pkgTest_co2_emission.tif"
test<-
statsGRASS(grass = grass,
addon_base = "../../johannes/mapme.protectedareas/data-raw/addons/",
areas = aoi,
tree_cover = treeCover,
tree_loss = lossYear,
tree_co2 = co2Layer,
idcol = "id",
thresholdClump = 6,
thresholdCover = 10,
years = 2001:2020,
saveRaster = F,
.tmpdir="~/shared/datalake/tempdir/")
results in:
Warning in statsGRASS(grass = grass, addon_base = "../../johannes/mapme.protectedareas/data-raw/addons/", :
IMPORTANT WARNING: The use of the CO2 emission layer during analysis is currently discouraged.
Several routines need to be adapted since the usage of a new data set by Harris et al (2021) (see https://www.nature.com/articles/s41558-020-00976-6)
Check out https://github.com/mapme-initiative/mapme.forest/issues/7 to recieve information if the issue has been solved.
ERROR: Variable 'LOCATION_NAME' not set
Error in if (!compatible) { : argument is of length zero
In addition: Warning message:
In system(paste("g.version", get("addEXE", envir = .GRASS_CACHE), :
running command 'g.version' had status 1
Hi @goergen95 .
Me again. Seems like currently the Grass functions are not working as expected.
results in:
can you confirm?