convertGADM: Convert Global Administrative Areas (GADM) Shapefile

Description Usage Arguments Value Note References Examples

View source: R/convertGADM.R

Description

A SpatialPolygonsDataFrame file is downloaded from the Database of Global Administrative Areas (GADM) database with additional columns of data added. The resulting file will be created in the spatial data directory which is set with setSpatialDataDir(). Dataset and file names are generated like this:

paste0('gadm_', countryCode, '_', admLevel)

Level 0 will return the national outline. Level 1 will give state/province boundaries. etc.

Usage

1
convertGADM(countryCode = NULL, admLevel = 0, nameOnly = FALSE)

Arguments

countryCode

ISO-3166-1 alpha-2 country code

admLevel

administrative level to be downloaded

nameOnly

logical specifying whether to only return the name without creating the file

Value

Name of the dataset being created.

Note

Not all countries have the same number of levels. Many just have two levels while France has five.

References

https://gadm.org/data.html.

Examples

1
2
3
4
## Not run: 
convertGADM('DE', 1)

## End(Not run)

MazamaSpatialUtils documentation built on Sept. 29, 2019, 1:03 a.m.