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
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)

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