Learn R Programming

Rnightlights (version 0.2.4)

getCtryTileList: Returns a list of VIIRS nightlight tiles that a country or countries intersects with

Description

Given a list of countries, this function will provide alist of VIIRS nightlight tiles that intersect with them. This helps in processing multiple countries by determining which nightlight tiles are required for processing by allowing the download of all required tiles before processing. Note all VIIRS_* nlTypes have the same nlTiles.

Usage

getCtryTileList(ctryCodes, nlType, omitCountries = "none")

Arguments

ctryCodes

character vector of country codes to process

nlType

character string The nlType of interest

omitCountries

countries to exclude from processing. This is helpful when the number of countries to exclude is smaller than the number to process e.g. when one wants to process all countries and exclude countries that take long to process i.e. omitCountries = "long"

Value

TRUE/FALSE

Examples

Run this code
# NOT RUN {
Rnightlights:::getCtryTileList(ctryCodes=c("BDI", "KEN", "RWA", "TZA", "UGA"), 
    nlType="VIIRS.M", omitCountries="none")

#only 1 tile for OLS
Rnightlights:::getCtryTileList(ctryCodes=c("BDI", "KEN", "RWA", "TZA", "UGA"), 
    nlType="OLS.Y", omitCountries="none")
    #returns "DUMMY"

# }

Run the code above in your browser using DataLab