Learn R Programming

EmissV (version 0.664.5)

rasterSource: Distribution of emissions by a georeferenced image

Description

Calculate the spatial distribution by a raster

Usage

rasterSource(r, grid, nlevels = "all", verbose = T)

Arguments

r

input raster object

grid

grid object with the grid information

nlevels

number of vertical levels off the emission array

verbose

display additional information

Value

Returns a matrix

Details

About the DMSP and example data https://en.wikipedia.org/wiki/Defense_Meteorological_Satellite_Program

See Also

gridInfo and lineSource

Examples

Run this code
# NOT RUN {
grid  <- gridInfo(paste(system.file("extdata", package = "EmissV"),"/wrfinput_d01",sep=""))
x     <- raster::raster(paste(system.file("extdata", package = "EmissV"),"/dmsp.tiff",sep=""))
test  <- rasterSource(x,grid)
# }
# NOT RUN {
image(test,axe = F, main = "Spatial distribution by Persistent Nocturnal Lights from DMSP")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab