Skip to contents

Plot a 3D raster

Usage

plot_raster_3d(
  x,
  fact = 0,
  cols = "topo",
  split_lake = FALSE,
  mask_to_lake = FALSE,
  shoreline = NULL,
  lake_elev = NULL,
  add_shoreline = FALSE,
  aspectratio_z = 0.2,
  dim_px = 300
)

Arguments

x

SpatRaster object

fact

positive integer. Aggregation factor expressed as number of cells in each direction (horizontally and vertically). Or two integers (horizontal and vertical aggregation factor) or three integers (when also aggregating over layers)

mask_to_lake

logical, mask the raster to the lake. Default is FALSE.

shoreline

sf object of lake shoreline.

lake_elev

numeric, elevation of the lake surface. Can be extracted using the get_lake_surface_elevation function.

aspectratio_z

numeric, aspect ratio of the z axis. Default is 0.2.

dim_px

numeric, dimension of the plot in pixels. Default is 300.

Value

plotly object

Examples

r <- terra::rast(system.file("ex/elev.tif", package="terra"))
plot_raster_3d(r)