Skip to contents

Waterlines

Usage

bt_waterlines(
  bertin,
  data,
  dist = 5,
  nb = 3,
  precision = 3,
  stroke = "#5d81ba",
  strokeOpacity = c(1, 0.1),
  strokeWidth = c(1.2, 0.2),
  strokeDasharray = "none",
  strokeLinecap = "round",
  strokeLinejoin = "round",
  display = TRUE
)

Arguments

bertin

map object

data

sf object EPSG:4326

dist

distance between lines in pixels

nb

number of lines

precision

number of steps defining buffers. 1 = not accurate, 8 = accurate

stroke

stroke color

strokeOpacity

stroke opacity

strokeWidth

stroke width

strokeDasharray

stroke dash array

strokeLinecap

appearance of the line cap

strokeLinejoin

appearance of the intersection beetween two or several lines

display

Boolean to allow to show or hide the layer. This parameter has no effect on the calculation of the extent

Value

a map object

Examples

library(sf)
world <- st_read(system.file("gpkg/world.gpkg", package = "bertin"),
                 layer = "world", quiet = TRUE)
bt_param(margin = 10, width = 500, projection = "NellHammer") |>
  bt_layer(data = world) |>
  bt_waterlines(data = world, dist = 3, nb = 4) |>
  bt_draw()