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

Description Usage Arguments Value Examples

View source: R/tiles.R

Description

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

Usage

1
2
3
4
5
6
7
8
downloadNlTiles(
  nlType,
  configName = pkgOptions(paste0("configName_", nlType)),
  extension = extension,
  nlPeriod,
  tileList,
  multiTileStrategy = pkgOptions("multiTileStrategy")
)

Arguments

nlType

character The nightlight type

configName

character the config short name of raster being processed

extension

character the extension 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#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))

## End(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")
)

## End(Not run)

#returns TRUE if the download was successful or tile is cached locally

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