ggMap_getROMSGridLayers: Create ROMS grid layers for maps based on the 'ggplot2'...

View source: R/ggMap_getROMSGridLayers.R

ggMap_getROMSGridLayersR Documentation

Create ROMS grid layers for maps based on the ggplot2 package

Description

This function creates a ROMS grid layers for maps based on the ggplot2 package.

Usage

ggMap_getROMSGridLayers(
  grid,
  bathym.scale = c(seq(0, 200, 25), seq(250, 500, 50), seq(1000, 6000, 1000)),
  final.crs = wtsGIS::get_crs("WGS84"),
  bbox = wtsROMS::getStandardBBox("EBS"),
  colors.bg = "white",
  colors.land = "grey85",
  scale.bathym = ggplot2::scale_fill_viridis_d(option = "plasma", direction = -1),
  alpha.bathym = 1
)

Arguments

grid

- a ROMS grid from call to getGrid

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

scale.bathym

- ggplot2 scale_fill_ object to use for the bathymetry fill scale

alpha.bathym

- transparency for the bathymetry

Details

The returned list contains land and bathymetry layers (polygons), a fill scale for the bathymetry layer, a map scale, and a partial theme.

This convenience function delegates all work to gg_CreateROMSGridLayers.

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

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

Value

- a list with elements based on the ggplot2 package:

  • land - geom_sf layer for land-based grid polygons

  • bathym - geom_sf layer for bathymetry-based grid polygons

  • fill_scale - scale_fill_ object for bathymetry

  • map_scale - ggplot2 coord_ object

  • theme - partial ggplot2 theme with axis titles removed

See Also

See also gg_CreateROMSGridLayers, get_crs, getBBox, getStandardBBox.


wStockhausen/rDisMELS documentation built on March 27, 2022, 1 a.m.