Closed Jo-Schie closed 2 years ago
I can confirm that the Biomass Loss Layer currently cannot be downloaded due missing access rights. Seems like Amazon has changed its policy... We might need to include a authorization function. The only option for a rather "quick fix" that I see is to look if the data is available from another server.
Hi @goergen95 , I need your help here.
While running this code:
# get the file paths to the raster files
treeCover = "../../datalake/mapme.protectedareas/input/global_forest_watch/treecover2000.tif"
lossYear = "../../datalake/mapme.protectedareas/input/global_forest_watch/lossyear.tif"
co2Layer = "../../datalake/mapme.protectedareas/input/global_forest_watch/co2_emission_.tif"
# read the region of interest
roi <-
st_read("../test/sampling_AOIs_2021-09-28.gpkg")
# transform roi to wgs84
roi <-
st_transform(roi,
"+proj=longlat +datum=WGS84 +no_defs")
# path to the installed grass
grass = "/usr/lib/grass78"
# zonal statistics
roi_stats = statsGRASS(grass = grass,
addon_base = "./data-raw/addons",
areas = roi[1, ],
tree_cover = treeCover,
tree_loss = lossYear,
tree_co2 = co2Layer,
idcol = "UID",
thresholdClump = 6,
thresholdCover = 10,
years = 2001:2020,
saveRaster = T,
outdir = "../test/sampling_results/rasters/")
I got this error:
Error in execGRASS("g.extension", extension = "r.area", prefix = addon_base, :
The command:
g.extension extension=r.area prefix=./data-raw/addons operation=add
produced an error (1) during execution:
Fetching <r.area> from GRASS GIS Addons repository (be patient)...
svn: E170000: URL 'https://github.com/OSGeo/grass-addons/trunk/grass7/raster/r.area' doesn't exist
ERROR: GRASS Addons <r.area> not found
Is it related to grass installation on our server or due to the addons provider? Also, there is problem in accessing raster files as mentioned by Johannes, however, for now, we have all the rasters required for LA in the datalake.
Hi @Ohm-Np, I think that issue occurred before on the server. g.extension seems to be unable to install the r.area extension so that the function fails with the above error. Please make sure to install subversion along with your GRASS installation. For Ubuntu systems that would be something along the following lines:
sudo apt-get install subversion
Hope that helps!
Thank you @goergen95, I will let you know if it works.
there is currently a quickfix implemented for the download issue. The processing issue was resolved by reinstalling subversion
Hi @goergen95 . The packages download function seem to be broken.
gives this error message:
Any ideas how to quickfix this?