load_boundary: Load country boundaries into a 'SpatialPolygonsDataFrame'...

Description Usage Arguments Value Author(s) Examples

Description

Load country boundaries into a SpatialPolygonsDataFrame object

Usage

1
load_boundary(x = NULL, country_code = "world", adm_level = 0, ...)

Arguments

x

If missing, link[raster]{getData} function is used to load boundaries from the GADM project (http://gadm.org). Otherwise the name of the data source (see readOGR).

country_code

Country specified by three letter ISO code. Use function ccodes to get appropriate codes. If multiple countries are desired, provide a character vector of appropriate ISO codes.

adm_level

Level of administrative subdivision 0 = country, 1 = first level subdivision

...

Other arguments to readOGR.

Value

A SpatialPolygonsDataFrame object storing country boundaries.

Author(s)

Nils Noelke, Sebastian Schnell

Examples

1
2
3
4
5
6
# Load boundary of Germany
ger_bnd <- load_boundary(country_code = "DEU", adm_level = 0);
plot(ger_bnd);

# Load boundary of several countries
bnd <- load_boundary(country_code = c("DEU", "ITA", "FRA"));

AWF-GAUG/gsg documentation built on June 10, 2019, 8:43 a.m.