scan
) or parameter (param
) to a plan
position indicator (ppi
)R/project_as_ppi.R
project_as_ppi.Rd
Make a plan position indicator (ppi)
project_as_ppi(
x,
grid_size = 500,
range_max = 50000,
project = TRUE,
ylim = NULL,
xlim = NULL,
raster = NA,
k = 4/3,
re = 6378,
rp = 6357
)
# S3 method for param
project_as_ppi(
x,
grid_size = 500,
range_max = 50000,
project = TRUE,
ylim = NULL,
xlim = NULL,
raster = NA,
k = 4/3,
re = 6378,
rp = 6357
)
# S3 method for scan
project_as_ppi(
x,
grid_size = 500,
range_max = 50000,
project = TRUE,
ylim = NULL,
xlim = NULL,
raster = NA,
k = 4/3,
re = 6378,
rp = 6357
)
An object of class param
or scan
.
Cartesian grid size in m.
Maximum range in m.
Whether to vertically project onto earth's surface.
The range of latitudes to include.
The range of longitudes to include.
(optional) RasterLayer with a CRS. When specified this raster topology is used for the output,
and grid_size
, range_max
, xlim
, ylim
are ignored.
Standard refraction coefficient.
Earth equatorial radius in km.
Earth polar radius in km.
An object of class 'ppi'.
The returned PPI is in Azimuthal Equidistant Projection.
project_as_ppi(param)
: Project as ppi
for a single scan parameter.
project_as_ppi(scan)
: Project multiple ppi
's for all scan
parameters in a scan
# load a polar scan example object:
data(example_scan)
example_scan
#> Polar scan (class scan)
#>
#> parameters: DBZH VRADH RHOHV ZDR PHIDP
#> elevation angle: 0.5 deg
#> dims: 480 bins x 360 rays
# plot the scan:
plot(example_scan)
# make PPIs for all scan parameters in the scan:
ppi <- project_as_ppi(example_scan)
#> Warning: CRS object has comment, which is lost in output; in tests, see
#> https://cran.r-project.org/web/packages/sp/vignettes/CRS_warnings.html
# print summary info for the ppi:
ppi
#> Plan position indicator (class ppi)
#>
#> parameters: DBZH VRADH RHOHV ZDR PHIDP
#> dims: 201 x 200 pixels
#>
# plot the ppi:
plot(ppi)
# extract the DBZH scan parameter of the volume to a new
# object 'param':
param <- get_param(example_scan, "VRADH")
# make a ppi for the new 'param' object:
ppi <- project_as_ppi(param)
# print summary info for this ppi:
ppi
#> Plan position indicator (class ppi)
#>
#> parameters: VRADH
#> dims: 201 x 200 pixels
#>
# plot the ppi:
plot(ppi)