Internal function to create a basemapData
object for basemap
basemap_data(
limits = NULL,
data = NULL,
shapefiles = NULL,
bathymetry = FALSE,
glaciers = FALSE,
lon.interval = NULL,
lat.interval = NULL,
expand.factor = 1.1,
rotate = FALSE,
verbose = FALSE
)
A list of class basemapData
containing information required for plotting a basemap
.
Map limits. One of the following:
numeric vector of length 4: The first element defines the start longitude, the second element the end longitude (counter-clockwise), the third element the minimum latitude and the fourth element the maximum latitude of the bounding box. The coordinates can be given as decimal degrees or coordinate units for shapefiles used by a projected map. Produces a rectangular map. Latitude limits not given in min-max order are automatically ordered to respect this requirement.
single integer between 30 and 88 or -88 and -30 produces a polar map for the Arctic or Antarctic, respectively.
Can be omitted if data
or shapefiles
are defined.
A data frame, SpatialPolygons, or sf shape containing longitude and latitude coordinates. If a data frame, the coordinates have to be given in decimal degrees. The limits are extracted from these coordinates and produces a rectangular map. Suited for situations where a certain dataset is plotted on a map. The function attempts to guess the correct columns and it is advised to use intuitive column names for longitude (such as "lon", "long", or "longitude") and latitude ("lat", "latitude") columns. Can be omitted if limits
or shapefiles
are defined.
Either a list containing shapefile information or a character argument referring to a name of pre-made shapefiles in shapefile_list
. This name is partially matched. Can be omitted if limits
or data
are defined as decimal degrees.
Logical indicating whether bathymetry should be added to the map.
Logical indicating whether glaciers and ice-sheets should be added to the map.
Numeric value specifying the interval of longitude and latitude grids. NULL
finds reasonable defaults depending on limits
.
Expansion factor for map limits with the data
argument. Can be used to zoom in and out automatically limited maps. Defaults to 1.1. Set to NULL
to ignore.
Logical indicating whether the projected maps should be rotated to point towards the pole relative to mid-longitude limit. Experimental.
Logical indicating whether information about the projection and guessed column names should be returned as message. Set to FALSE
to make the function silent.
Mikko Vihtakari
This is an internal function, which is automatically run by the basemap
function. Common users do not need to worry about these details.
basemap