R/get_env_variables.R
get_env_variables.Rd
Variables are type of soil, elevation, slope, aspect, roughness, solar radiation, distance to sea, protected areas, distance to roads, distance to cities and town, distance to rivers and waterbodies.
get_env_variables(
extent_latlon,
extent_proj,
EPSG,
country_name,
destination,
resol = 1000,
rm_download = FALSE,
forest_year = 2010,
gisBase = NULL
)
vector. First output of get_aoi_extent()
function.
vector. Second output of get_aoi_extent()
function.
int. to consider for this country/area.
character. country name (in English) which be
use to collect protected areas. This country must be available in
https://www.protectedplanet.net/en/thematic-areas/wdpa?tab=WDPA
.
character. absolute path where to download files
like here()
output.
int. Resolution. If in meters, recommended resolutions are 250m, 500m, 1km, 2km or 5km. The resolution needs to be carefully chosen. If set too small (e.g. < 250m), raster file will be too big to fit in memory and R will crash. Default is 1km.
boolean. If TRUE remove download files and
folders. Keep only environ.tif in data_raw
folder, default is
FALSE.
int. Forest at the decade chosen. Must be one of 2000, 2010 or 2020, default is 2010.
NULL or character. Parameter gisBase
for
rgrass::initGRASS()
. The directory path to GRASS binaries and
libraries, containing bin and lib subdirectories among others; if
NULL, system("grass --config path") is tried.
character. Absolute path to environ.tif
file.
environ.tif.aux.xml is an extention of environ.tif, it
allows to classify soilgrid variable with QGIS with
RasterAttributeTable extension. Nevertheless it's cause problems
to open it with stars
package but not with terra
. If you have
any problems to open environ.tif, you can remove
environ.tif.aux.xml. This solve all accessibility problems with
stars
and terra
packages.
Unit of each environ variable :
Name | Unit |
Elevation | m |
Aspect | degrees |
Roughness | m |
Slope | degrees |
Solar radiation | Wh.m^-2.day |
Soilgrids | category |
Forest | binary |
Distance to forest | m |
Distance sea | m |
Distance road | m |
Distance place | m |
Distance watering place | m |
Protected Area (WDPA) | category |
Population density | people/km² |