gadm_sp_loadCountries: Load one or more GADM shapefiles (SpatialPolygonsDataFrame)

Description Usage Arguments Value ISO-3166-1 Note Author(s) References See Also Examples

Description

Load one or more GADM shapefiles as SpatialPolygonsDataFrame from a local path or from a remote repository.

Usage

1
2
3
4
5
6
   gadm_sp.loadCountries(fileNames, level = 0, basefile=GADM_BASE,
                         baseurl=GADM_URL, simplify=NULL)

   # deprecated
   gadm_sp.loadCountries(fileNames, level = 0, basefile=GADM_BASE,
                         baseurl=GADM_URL, simplify=NULL)

Arguments

fileNames

Character vector of named regions. An ISO-3166-1 code or a custom name. You don't have to specify the suffix (admX) nor the file extension (.rds).

level

Integer the level of the administrative boundaries (0 is the country, higher values equal finer divisions)

basefile

Character vector the path of the directory where shapefiles are stored. Default is "./GADM"

baseurl

Character vector The url of GADM files. Default is "https://biogeo.ucdavis.edu/data/gadm3.6/Rsp/"

simplify

Numeric Numerical tolerance value to be used by the Douglas-Peuker algorithm. Higher values use less polygon points (and less memory) and lower values use more polygon points (and more memory). We suggest not going higher than 0.025 in order for intra-country boundaries to align.

Value

Object gadm_sp

ISO-3166-1

See : https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 or take a look on the vignette "GADMTools - ISO 3166-1 alpha-3"

Note

gadm_sp.loadCountries() and gadm.loadCountries are deprecated, they will be removed in the next release. Please use gadm_sp_loadCountries()

Author(s)

Jean Pierre Decorps <jp.decorps@epiconcept.fr>

References

—-

See Also

gadm_sf.loadCountries

Examples

1
2
3
4
# library(GADMTools)
#
# Belgium = gadm_sp_loadCountries("BEL", level=2, basefile="./")
# plotmap(Belgium)

IamKDO/GADMTools documentation built on Aug. 23, 2021, 5:14 a.m.