getCtryPolyUrl: Get the GADM url from which to download country polygons

Description Usage Arguments Value Examples

View source: R/polygons.R

Description

Get the url from which to download country polygons. Polygons are downloaded from http://gadm.org. This provides the url to the zipped ESRI Shapefile which when decompressed contains a directory with the different country admin level boundary files. A sample url returned for Afghanistan: http://biogeo.ucdavis.edu/data/gadm2.8/shp/AFG_adm_shp.zip

Usage

1
2
3
getCtryPolyUrl(ctryCode = NULL,
  gadmVersion = pkgOptions("gadmVersion"),
  gadmPolyType = pkgOptions("gadmPolyType"), custPolyPath = NULL)

Arguments

ctryCode

character string The ctryCode of interest

gadmVersion

The GADM version to use

gadmPolyType

The format of polygons to download from GADM

custPolyPath

Alternative to GADM. A path to a custom shapefile zip

Value

Character string url of the zipped ESRI shapefile for the ctryCode

Examples

1
2
3
ctryCode <- "KEN"
Rnightlights:::getCtryPolyUrl(ctryCode)
 #returns url for the zipped country ESRI shapefile

Rnightlights documentation built on Aug. 29, 2019, 5:02 p.m.