projectedmap: Return a projected map with given extent

Description Usage Arguments Examples

Description

The function takes either limits of extent or a two-column matrix and returns a projected map containing the original limits or the points.

Usage

1
2
3
projectedmap(extent, CRS = "+proj=longlat +datum=WGS84",
  inCRS = "+proj=longlat +datum=WGS84", resolution = "low", pad = 0.04,
  ...)

Arguments

extent

Either (1) a four element numeric vector of east min, east max, north min, north max or (2) a two-column matrix of coordinates of points that should be shown on the map, or (3) a species occurence data from occ (spocc package).

CRS

CRS string defining the output projection.

inCRS

CRS string describing the input projection of extent. This will not be used if CRS is already defined for the extent.

resolution

Resolution of the map as defined in getMap.

pad

extend climits by this proportion of coordinate range.

...

Other arguments passed to the function (ignored).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Lambert Azimuthal Equal Area: EU recommendation
pl <-projectedmap(c(5,31,54,71), CRS="+init=epsg:3035", pad=0)
plot(pl, col="gray")
## display extent defined by latitude and longitude ranges
llgridlines(pl, east=c(5,31), north=c(54,71), lty=1)

## Research areas in Virtanen et al., J. Veg. Sci. 17, 519-528 (2006)
sites <- structure(list(lon = c(41, 46, 50, 54, 67, 70, 102, 
112, 117, 141, 142, 149, 163, 179, 16, 138), lat =
c(67.3, 68.15, 69.15, 68.5, 70.45, 73, 77.2, 76, 73, 72, 75, 71, 69,
71, 78, 75)), .Names = c("longit", "latid"), row.names = c("Kack",
"Kani", "Kolg", "Pech", "WYam", "NYam", "Chel",
"Neta", "Olon", "Yana", "Fadd", "Lopa", "Koly",
"Wran", "Sval", "Kote"), class = "data.frame")
## LAEA North Pole Russia -- default padding will extend the area to an
## illegal polygon
pl <- projectedmap(sites, CRS= "+init=epsg:3576", pad=0)
plot(pl)
points(attr(pl, "input"), pch=16, col=4)

jarioksa/biogeo documentation built on May 18, 2019, 3:47 p.m.