fetch_gadm_sfs: Fetch gadm mapping shapefiles

View source: R/fetch_gadm_sfs.R

fetch_gadm_sfsR Documentation

Fetch gadm mapping shapefiles

Description

Retrieve AREAdata gadm mapping shapefiles specified by spatial scale (GID). These vectors are cached as GeoPackage files.

Usage

fetch_gadm_sfs(
  gid = 0,
  cache_location = NULL,
  refresh_cache = FALSE,
  basereq = ad_basereq(),
  call = rlang::caller_env()
)

Arguments

gid

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

cache_location

path to cache location (defaults to a temporary user directory, or one set by set_default_ohvbd_cache()).

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.

call

The env from which this was called (defaults to the direct calling environment).

Value

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

Author(s)

Francis Windram

Examples


fetch_gadm_sfs(gid=0)


ohvbd documentation built on March 10, 2026, 1:07 a.m.