mapCtryPolyToTilesVIIRS: Create a mapping of all countries and the tiles they...

Description Usage Arguments Value Examples

View source: R/tiles.R

Description

Create a dataframe mapping each country in the rworldmap to the VIIRS tiles which they intersect with and thus need to be retrieved to process their nightlight imagery. Since some functions use this dataframe for long-term processing, omitCountries can eliminate countries that should be excluded from the list hence from processing. Countries can be added in the omitCountries function. Default is "none".

Usage

1
2
3
4
mapCtryPolyToTilesVIIRS(
  ctryCodes = "all",
  omitCountries = pkgOptions("omitCountries")
)

Arguments

ctryCodes

A character vector or list of countries to map. Default is "all"

omitCountries

A character vector or list of countries to leave out. Default is "none"

Value

ctryCodeTiles A data frame of countries and the tiles they intersect with as give by getNlTiles

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#map all countries
## Not run: 
tileMap <- Rnightlights:::mapCtryPolyToTilesVIIRS()

## End(Not run)

#map all countries, no countries omitted
## Not run: 
tileMap <- Rnightlights:::mapCtryPolyToTilesVIIRS(ctryCodes="all", omitCountries="none")

## End(Not run)

#will not omit countries that do not have polygons on GADM
## Not run: 
tileMap <- Rnightlights:::mapCtryPolyToTilesVIIRS(omitCountries=c("error", "missing"))

## End(Not run)

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