| suggest_crs | R Documentation |
This function provides suggestions for map projections depending on the extent of the map. For SDMs, an equal area projection is generally favoured, but it is also possible to get suggestions for conformal, equidistant or compromise projections. The algorithm is a reimplementation in R of Projection Wizard (Bojan et al., 2016), version 2.1. (https://projectionwizard.org/)
suggest_crs(
x,
distortion = c("equal_area", "conformal", "equidistant", "compromise"),
round_cm = FALSE,
return_best = TRUE,
datum = c("WGS84", "ETRS89", "NAD83"),
unit = c("m", "ft"),
lat_check = TRUE,
world_equidist = NULL,
quiet = FALSE
)
x |
A vector of four numeric values representing the extent of the map (xmin, xmax, ymin, ymax), or a SpatExtent object, or a SpatRaster object. |
distortion |
The type of distortion to be minimized. Options are "equal_area", "conformal", "equidistant" and "compromise". Default is "equal_area". |
round_cm |
Logical. If TRUE, the central meridian is rounded to the nearest degree. Default is FALSE. |
return_best |
Logical. If TRUE, only the best projection is returned, otherwise, if there are multiple options, a list will be returned |
datum |
The datum to use. Options are "WGS84", "ETRS89" and "NAD83". Default is "WGS84". |
unit |
The unit to use. Options are "m" and "ft". Default is "m". |
lat_check |
Logical. If TRUE, the function will check if lat values are within range (-90,90). Default is TRUE. |
world_equidist |
if
|
quiet |
Logical. If TRUE, suppresses messages. Default is FALSE. |
Either a list of two strings (proj4 and WKT) for a single projection (if either only one projection is available or return_best is TRUE), or a list of lists, each containing two strings (proj4 and WKT) for a single projection (if multiple projections are available and return_best is FALSE).
Bojan, S, Bernhard, J, & Helen, J (2016) Projection Wizard - An Online Map Projection Selection Tool. The Cartographic Journal 53(2):177-185 DOI: 10.1080/00087041.2015.1131938
# Whole map
suggest_crs(c(-180, 180, -90, 90))
# Northen Hemisphere
suggest_crs(c(-180, 180, 21, 70))
# Hemisphere showing the tropics
suggest_crs(c(-180, 180, -7, 21))
# Regional map for EW extent
suggest_crs(c(-60, 20, 40, 70))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.