add_gps_to_rayshader: Adds a GPS trace to a 'rayshader' scene

Description Usage Arguments Value Examples

View source: R/add_gps_to_rayshader.R

Description

Adds a GPS trace to a 'rayshader' scene

Usage

 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
)

Arguments

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

Value

Adds GPS trace to the current 'rayshader' scene

Examples

1
2
3
4
5
6
flight <- example_igc()
add_gps_to_rayshader(example_raster(),
  flight$lat,
  flight$long,
  flight$altitude,
  zscale = 25)

geoviz documentation built on March 26, 2020, 9:15 p.m.