composite_ppi: Create a composite of multiple plan position indicators...

View source: R/composite_ppi.R

composite_ppiR Documentation

Create a composite of multiple plan position indicators (ppi)


Combines multiple plan position indicators (ppi) into a single ppi. Can be used to make a composite of ppi's from multiple radars.


  param = "all",
  nx = 100,
  ny = 100,
  raster = NA,
  method = "max",
  idp = 2,
  idw_max_distance = NA,
  coverage = FALSE



A list of ppi objects.


The scan parameter name(s) to composite. An atomic vector of character strings can be provided to composite multiple scan parameters at once. To composite all available scan parameters use 'all' (default).


number of raster pixels in the x (longitude) dimension


number of raster pixels in the y (latitude) dimension


x (longitude) range


y (latitude) range


numeric vector of length 1 or 2 to set the resolution of the raster (see res). If this argument is used, arguments nx and ny are ignored. Unit is identical to xlim and ylim.


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"


(optional) RasterLayer with a CRS. When specified this raster topology is used for the output, and nx, ny, res arguments are ignored.


string. Compositing method, one of "mean", "min", "max" or "idw". Provide a list of methods names of length(param) to apply different methods to each of the parameters.


numeric. inverse distance weighting power.


numeric. Maximum distance from the radar to consider in inverse distance weighting. Measurements beyond this distance will have a weighting factor of zero.


logical. When TRUE adds an additional "coverage" parameter to the ppi with the number of PPIs covering a single composite ppi pixel.


This function composites multiple ppi objects into a ppi object that combines all data.

Either multiple ppi's of different scan elevation of the same radar may be combined, or ppi's of different radars can be composited.

Argument method determines how values of different ppi's at the same geographic location are combined.


Compute the average value


Compute the maximum value. If ppi's are of the same radar and the same polar volume, this computes a max product, showing the maximum detected signal at that geographic location.


Compute the minimum value


This option is useful primarily when compositing ppi's of multiple radars. Performs an inverse distance weighting, where values are weighted according to 1/(distance from the radar)^idp

The coordinates system of the returned ppi is a WGS84 (lat, lon) datum, unless a different crs is provided. If only res is provided, but no crs is set, res is in meter units and the origin of the composite ppi is set to the mean (lat, lon) location.

This function is a prototype and under active development


A ppi.


# locate example volume file:
pvolfile <- system.file("extdata", "volume.h5", package = "bioRad")

# load the file:
example_pvol <- read_pvolfile(pvolfile)

# calculate a ppi for each elevation scan
my_ppis <- lapply(example_pvol$scans, project_as_ppi)

# overlay the ppi's, calculating the maximum value observed
# across the available scans at each geographic location
my_composite <- composite_ppi(my_ppis, method="max")

## Not run: 
# download basemap
bm <- download_basemap(my_composite)

# plot the calculated max product on the basemap
map(my_composite, bm)

## End(Not run)

bioRad documentation built on Aug. 31, 2022, 1:05 a.m.