Description Usage Arguments Value Examples
View source: R/add_gps_to_rayshader.R
Adds a GPS trace to a 'rayshader' scene
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | add_gps_to_rayshader(
  raster_input,
  lat,
  long,
  alt,
  zscale,
  line_width = 1,
  colour = "red",
  alpha = 0.8,
  lightsaber = TRUE,
  clamp_to_ground = FALSE,
  raise_agl = 0,
  ground_shadow = FALSE,
  as_line = TRUE,
  point_size = 20
)
 | 
| raster_input | a raster | 
| lat | vector of decimal latitude points | 
| long | vector of decimal longitude points | 
| alt | vector of altitudes | 
| zscale | ratio of raster cells to altitude | 
| line_width | line width of the gps trace | 
| colour | colour of the gps trace | 
| alpha | alpha of the gps trace (has no effect if lightsaber = TRUE) | 
| lightsaber | (default = TRUE) gives the GPS trace an inner glow affect | 
| clamp_to_ground | (default = FALSE) clamps the gps trace to ground level + raise_agl | 
| raise_agl | (default = 0) raises a clamped to ground track by the specified amount. Useful if gps track occasionally disappears into the ground. | 
| ground_shadow | (default = FALSE) adds a ground shadow to a flight gps trace | 
| as_line | (default = TRUE) Set to FALSE to render single points instead of a trace line (which then ignores line_width & lightsaber) | 
| point_size | size of points when as_line = TRUE | 
Adds GPS trace to the current 'rayshader' scene
| 1 2 3 4 5 6 | flight <- example_igc()
add_gps_to_rayshader(example_raster(),
  flight$lat,
  flight$long,
  flight$altitude,
  zscale = 25)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.