Skip to contents

Extract raster data for an AOI (Countries)

Usage

extract_raster(countries, ras, mask = FALSE, buffer = 0.1)

Arguments

countries

List of the country names or sf object

ras

RasterLayer or Path to raster file

mask

Should the extracted data match the exact boundary limits?

buffer

Extend AOI extent by x

Value

      spdf spatial dataframe

Examples

if (FALSE) {
 library(gisr)
 library(sf)

 get_terrain(countries = list("Zambia"))
 get_terrain(countries = list("Zambia"), mask = TRUE)
 get_terrain(countries = list("Zambia"), buffer = .5, terr = "../../HDX_Data")
}