Learn R Programming

Rnightlights (version 0.2.4)

downloadNlTiles: Download the listed tiles for a given nlType in a given nlPeriod

Description

Download the listed tiles for a given nlType in a given nlPeriod

Usage

downloadNlTiles(nlType, configName = pkgOptions(paste0("configName_",
  nlType)), nlPeriod, tileList,
  multiTileStrategy = pkgOptions("multiTileStrategy"))

Arguments

nlType

character The nightlight type

configName

character the type of raster being processed

nlPeriod

character The nlPeriod to process in the appropriate format

tileList

integer vector or character vector of digits containing valid tile numbers as obtained by tileName2Idx for VIIRS. Ignore for nlType=="OLS"

multiTileStrategy

character How to handle multiple tiles per nlPeriod

Value

TRUE/FALSE if the download was successful

Examples

Run this code
# NOT RUN {
#download VIIRS tiles for "KEN" which are tiles 2 and 5 for the specified
    #time periods
# }
# NOT RUN {
Rnightlights:::downloadNlTiles("VIIRS.M", "201401", c(2, 5))
# }
# NOT RUN {
#same as above but getting the tileList automatically
# }
# NOT RUN {
Rnightlights:::downloadNlTiles(nlType="VIIRS.M", 
    nlPeriod="201401", 
    tileList=Rnightlights:::getCtryTileList(ctryCodes="KEN", 
        nlType="VIIRS.M")
)
# }
# NOT RUN {
#returns TRUE if the download was successful or tile is cached locally

# }

Run the code above in your browser using DataLab