ctryShpLyrName2Num: Get the integer number of the layer.

Description Usage Arguments Value Examples

View source: R/polygons.R

Description

Get the integer number of the layer. Is the last character in the name and is a digit. E.g. for the 3rd layer in Kenya shapefile polygon named "KEN_adm3" the layer number is 3. The lowest layer number is 0

Usage

1
2
3
4
5
6
7
ctryShpLyrName2Num(
  ctryCode = NULL,
  layerName,
  gadmVersion = pkgOptions("gadmVersion"),
  gadmPolyType = pkgOptions("gadmPolyType"),
  custPolyPath = NULL
)

Arguments

ctryCode

The ctryCode to process

layerName

- the name of the polygon layer

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

Integer layer number

Examples

1
2
3
4
## Not run: 
  Rnightlights:::ctryShpLyrName2Num("KEN", "KEN_adm1") #returns 1

## End(Not run)

chrisvwn/Rnightlights documentation built on Sept. 7, 2021, 1:44 a.m.