ray_path: Calculate the ray paths / segment of great circles

View source: R/ray_path.R

ray_pathR Documentation

Calculate the ray paths / segment of great circles

Description

This function calculates the segments great circles using the (lat, lon) coordinates obtained with ray or ray_source. It returns a LINESTRING geometry that is ready for plot.

Usage

ray_path(x, y)

Arguments

x

vector with the longitude obtained with ray or ray_source

y

vector with the latitude obtained with ray or ray_source

Value

sfc_LINESTRING sfc

Examples

{
# Coelho et al. (2015):
input <- system.file("extdata",
                     "uwnd.mon.mean_200hPa_2014JFM.nc",
                      package = "raytracing")
b <- betaks(u = input)
rt <- ray(betam = b$betam,
          u = b$u,
          lat = b$lat,
          K = 3,
          itime = 30,
          x0 = -135,
          y0 = -30,
          dt = 6,
          direction = -1)
rp <- ray_path(x = rt$lon, y = rt$lat)
plot(rp,  axes = TRUE, graticule = TRUE)
}

raytracing documentation built on June 7, 2022, 1:09 a.m.