scan_to_raster | R Documentation |
convert an object of class 'scan' into a raster of class 'RasterBrick'
scan_to_raster(
scan,
nx = 100,
ny = 100,
xlim,
ylim,
res = NA,
param,
raster = NA,
lat,
lon,
crs = NA,
k = 4/3,
re = 6378,
rp = 6357
)
scan |
a scan (sweep) of class scan |
nx |
number of raster pixels in the x (longitude) dimension |
ny |
number of raster pixels in the y (latitude) dimension |
xlim |
x (longitude) range |
ylim |
y (latitude) range |
res |
numeric vector of length 1 or 2 to set the resolution of the raster (see res).
If this argument is used, arguments |
param |
scan parameters to include. If |
raster |
(optional) RasterLayer with a CRS. When specified this raster topology is used for the output, and nx, ny, res arguments are ignored. |
lat |
Geodetic latitude of the radar in degrees. If missing taken from |
lon |
Geodetic longitude of the radar in degrees. If missing taken from |
crs |
character or object of class CRS. PROJ.4 type description of a Coordinate Reference System (map projection). When 'NA' (default), an azimuthal equidistant projection with origin at the radar location is used. To use a WSG84 (lat,lon) projection, use crs="+proj=longlat +datum=WGS84" |
k |
Numeric. Standard refraction coefficient. |
re |
Numeric. Earth equatorial radius, in km. |
rp |
Numeric. Earth polar radius, in km. |
uses scan_to_spatial to georeference the scan's pixels. If multiple scan pixels fall within the same raster pixel, the last added pixel is given (see rasterize for details).
a RasterBrick
# default projects full extent on 100x100 pixel raster:
scan_to_raster(example_scan)
# crop the scan and project at a resolution of 0.1 degree:
scan_to_raster(example_scan, ylim = c(55, 57), xlim = c(12, 13), res = .1)
# using a template raster
template_raster <- raster::raster(raster::extent(12, 13, 56, 58), crs = sp::CRS("+proj=longlat"))
scan_to_raster(example_scan, raster = template_raster)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.