powered by
Adds a GPS trace to a 'rayshader' scene
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 )
a raster
vector of decimal latitude points
vector of decimal longitude points
vector of altitudes
ratio of raster cells to altitude
line width of the gps trace
colour of the gps trace
alpha of the gps trace (has no effect if lightsaber = TRUE)
(default = TRUE) gives the GPS trace an inner glow affect
(default = FALSE) clamps the gps trace to ground level + raise_agl
(default = 0) raises a clamped to ground track by the specified amount. Useful if gps track occasionally disappears into the ground.
(default = FALSE) adds a ground shadow to a flight gps trace
(default = TRUE) Set to FALSE to render single points instead of a trace line (which then ignores line_width & lightsaber)
size of points when as_line = TRUE
Adds GPS trace to the current 'rayshader' scene
# NOT RUN { flight <- example_igc() add_gps_to_rayshader(example_raster(), flight$lat, flight$long, flight$altitude, zscale = 25) # }
Run the code above in your browser using DataLab