Skip to contents

Retrieve AREAdata gadm mapping shapefiles specified by spatial scale (GID).

Usage

fetch_gadm_sfs(
  gid = 0,
  cache_location = "user",
  refresh_cache = FALSE,
  basereq = NA
)

Arguments

gid

the spatial scale to retrieve (0 = country-level, 1=province-level...).

cache_location

path to cache location (defaults to user directory obtained from tools::R_user_dir()).

refresh_cache

force a refresh of the relevant cached data.

basereq

the url of the AREAdata database (usually generated by ad_basereq()). If NA, uses the default.

Value

A SpatVector (from terra::vect()) of the requested shapefile.

Author

Francis Windram

Examples

if (FALSE) { # \dontrun{
fetch_gadm_sfs(gid=0)
} # }