ray_path {raytracing}R 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)
}

[Package raytracing version 0.6.0 Index]