an_mapscale: Calculate approximate map scale

View source: R/utils.R

an_mapscaleR Documentation

Calculate approximate map scale

Description

Calculate approximate map scale

Usage

an_mapscale(map_dimensions, map_extent)

Arguments

map_dimensions

numeric: 2-element numeric giving width and height of the map, in mm

map_extent

vector of c(longitude_min, longitude_max, latitude_min, latitude_max): the geographic extent of the map. map_extent can also be passed as a raster Extent object, a Raster object (in which case its extent will be used), a Spatial object (in which case the bounding box of the object will be used as the extent), or a matrix (in which case it will be assumed to be the output of sp::bbox)

Value

numeric

Examples

## an A3-sized map of the Southern Ocean (1:20M)
an_mapscale(map_dimensions = c(400, 570), map_extent = c(-180, 180, -90, -40))


ropensci/antanym documentation built on Sept. 9, 2022, 6:43 p.m.