Skip to contents

The viz_tissot function draws Tissot circles to visualize projection distortions on a map.

Usage

viz_tissot(
  map,
  id = NULL,
  step = 20,
  fill = "red",
  stroke = "white",
  strokeOpacity = 0.5,
  ...
)

Arguments

map

A geovizr map object created using viz_create().

id

character. Optional. Unique layer id.

step

numeric. Optional. Step between circles (default 20).

fill

character. Optional. Fill color (default "red").

stroke

character. Optional. Stroke color (default "white").

strokeOpacity

numeric. Optional. Stroke opacity (default 0.5).

...

Additional SVG attributes (strokeDasharray, strokeWidth, opacity, strokeLinecap...).

Value

A modified `geoviz` map object with a new layer added. Rendering is performed using viz_render().

Examples

library(sf)
world <- st_read(
  system.file("gpkg/world.gpkg", package = "geovizr"),
  quiet = TRUE
)

viz_create(projection = "Polar", background = "white") |>
  viz_path(datum = world, fill = "#f1f3f5") |>
  viz_tissot(fill = "#38896F") |>
  viz_render()