tmap_CreateBasemap: Create a basemap layer for maps based on the tmap package

View source: R/tmap_CreateBasemap.R

tmap_CreateBasemapR Documentation

Create a basemap layer for maps based on the tmap package

Description

This function creates a basemap layer for maps based on the tmap package.

Usage

tmap_CreateBasemap(
  layer.land = getPackagedLayer("Alaska"),
  layer.bathym = getPackagedLayer("ShelfBathymetry"),
  final.crs = get_crs("WGS84"),
  bbox = getStandardBBox("EBS"),
  colors.bg = "white",
  colors.land = "grey85",
  colors.bathym = "darkblue",
  alpha.bathym = 1,
  points.size = 0.01
)

Arguments

layer.land
  • a sf::sf object representing land

layer.bathym
  • a sf::sf object representing bathymetry

final.crs
  • representation of final (display) coordinate reference system (see details)

bbox
  • a bounding box (see details)

colors.bg
  • background color

colors.land
  • color for land

colors.bathym
  • color for the bathymetry

alpha.bathym
  • transparency for the bathymetry

points.size
  • size of points, in map units

Details

The basemap contains a land layer (polygons) and a bathymetry layer (lines). Uses getPackagedLayer() or readShapefile() to create the land and bathymetric layers. If bbox is NULL, then the bounding box for the land layer is used as the bounding box for the basemap.

The final coordinate reference system (final.crs) can be any object that can be converted to a sf::st_crs() object using get_crs().

The bounding box (bbox) can be any object that can be converted to a sf::bbox using getBBox().

Value

  • basemap layer based on the tmap package


wStockhausen/wtsGIS documentation built on Aug. 23, 2023, 2:31 a.m.