Calculate approximate map scale
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 ofsp::bbox
)