Skip to contents

Creates a map of distance-by-sea values and overlays coastlines for geographical context.

Usage

plot_DBS_map(DBS_map, title = "Coastline and distance by sea")

Arguments

DBS_map

A raster::RasterLayer object containing distance-by-sea values, such as the object returned by get_example_DBS_map().

title

Character string giving the plot title. Defaults to "Coastline and distance by sea".

Value

A ggplot2::ggplot() object showing the distance-by-sea raster and coastline.

Details

A distance-by-sea raster represents the distance travelled over accessible sea cells rather than the straight-line Euclidean distance between locations.

Raster cells with a value of zero are converted to missing values before plotting. Non-missing values are displayed using a continuous viridis colour scale.

The coastline data supplied with the package are transformed to the coordinate reference system of DBS_map before plotting.

See also

Examples

# Load and plot the baseline distance-by-sea raster
DBS_map <- get_example_DBS_map()
plot_DBS_map(DBS_map)


# Load and plot the distance-by-sea raster containing ORDs
DBS_with_ORDs <- get_example_DBS_map("ords")
plot_DBS_map(DBS_with_ORDs)