Calculates and returns an overlay of lines for the current height map.

generate_line_overlay(
geometry,
extent,
heightmap = NULL,
width = NA,
height = NA,
color = "black",
linewidth = 1,
lty = 1,
data_column_width = NULL,
offset = c(0, 0)
)

## Arguments

geometry An sf object with LINESTRING geometry. A raster::Extent object with the bounding box for the height map used to generate the original map. Default NULL. The original height map. Pass this in to extract the dimensions of the resulting overlay automatically. Default NA. Width of the resulting overlay. Default the same dimensions as height map. Default NA. Width of the resulting overlay. Default the same dimensions as height map. Default black. Color of the lines. Default 1. Line width. Default 1. Line type. 1 is solid, 2 is dashed, 3 is dotted,4 is dot-dash, 5 is long dash, and 6 is dash-long-dash. Default NULL. The numeric column to map the width to. The maximum width will be the value specified in linewidth. Default c(0,0). Horizontal and vertical offset to apply to the line, in units of geometry.

## Value

Semi-transparent overlay with contours.

## Examples

#Add the included sf object with roads to the montereybay dataset
#Only run these examples if the magick package is installed.
if (length(find.package("magick", quiet = TRUE)) > 0) {
# \donttest{
water_palette = colorRampPalette(c("darkblue", "dodgerblue", "lightblue"))(200)
bathy_hs = height_shade(montereybay, texture = water_palette)
montereybay %>%
attr(montereybay,"extent"), heightmap = montereybay))  %>%
plot_map()

#Change the line width, color, and transparency
montereybay %>%
attr(montereybay,"extent"), heightmap = montereybay),
alphalayer=0.8)  %>%
plot_map()

#Manually specify the width and height to improve visual quality of the lines
montereybay %>%