Learn R Programming

Rnightlights (version 0.2.3)

pkgOptions: Set or get options for the Rnightlights package

Description

Set or get options for the Rnightlights package

Usage

pkgOptions(...)

Arguments

...

Option names to retrieve option values or [key]=[value] pairs to set options.

Value

if an option name is supplied as a parameter this returns the value, else a list of all options is returned.

Supported options

The following options are supported

configName.VIIRS.D

(character) The regex to uniquely identify the tile file to use out of the downloaded tile .tgz. The version 1 monthly series is run globally using two different configurations.

The first excludes any data impacted by stray light. The second includes these data if the radiance vales have undergone the stray- light correction procedure (Reference). These two configurations are denoted in the filenames as "vcm" and "vcmsl" respectively. The "vcmsl" version, that includes the stray-light corrected data, will have more data coverage toward the poles, but will be of reduced quality.

It is up to the users to determine which set is best for their applications. The annual versions are only made with the "vcm" version, excluding any data impacted by stray light.

configName.VIIRS.M

(character) The regex to uniquely identify the tile file to use out of the downloaded monthly .tgz tile. Has the same options as configName.VIIRS.D

configName.VIIRS.Y

(character) The regex to uniquely identify the tile file to use out of the downloaded tile .tgz. The annual products can have other values for the config shortname (Field 5). They are:

  • vcm-orm (VIIRS Cloud Mask - Outlier Removed): This product contains cloud-free average radiance values that have undergone an outlier removal process to filter out fires and other ephemeral lights.

  • vcm-orm-ntl (VIIRS Cloud Mask - Outlier Removed - Nighttime Lights): This product contains the "vcm-orm" average, with background (non-lights) set to zero.

  • vcm-ntl (VIIRS Cloud Mask - Nighttime Lights): This product contains the "vcm" average, with background (non-lights) set to zero.

cropMaskMethod

(character) The method to use to clip the nightlight raster tiles to the country boundaries

deleteTiles

(character) whether to delete tiles after processing may be useful where diskspace is a concern

dirNlData

(character) The directory to store the extracted data files in

dirNlRoot

character) The root directory storing the package data

dirNlTiles

(character) The directory in which to store the downloaded VIIRS raster tiles

dirPolygon

(character) The directory to store the downloaded country administration level polygons

dirRasterOutput

(character) The directory in which to store the clipped country rasters

dirRasterWeb

(character) The directory in which to store the rasters resampled for web display

dirZonals

(character) The directory in which to store the zonal statistics country polygon

downloadMethod

(character) The download method to use

extractMethod

(character) The method to use to extract data from the rasters

gdalCacheMax

(character) The maximum memory gdal should use in gdal_rasterize

ntLtsIndexUrlOLS

(character) The url with the OLS tile index

ntLtsIndexUrlVIIRS

(character) The url with the VIIRS tile index

numCores

(character) The number of processor cores to use when extractMethod = "raster"

omitCountries

(character) The countries to exclude in processing

stats

(character) The statistics to calculate for country regions. The default are sum and mean. Any other aggregate statistics can be included. Also any aggregate function accessible in the current environment can be added.

tmpDir

(character) Change the temporary directory for processing rasters. Not in use

Examples

Run this code
# NOT RUN {
#retrieve the current cropMaskMethod
pkgOptions("cropMaskMethod")

#set the cropMaskMethod
pkgOptions(cropMaskMethod="gdal")

#retrieve all options
pkgOptions()

# }

Run the code above in your browser using DataLab