wgs84: World Geodetic System 1984 coordinate reference

Description Usage Arguments Value See Also Examples

Description

A helper function returning a CRS object giving the WGS84 coordinate reference, either projected or unprojected.

Usage

1
wgs84(projected = FALSE)

Arguments

projected

Whether to return the projected WGS84 reference, defaults to the unprojected.

Value

An object of class CRS

See Also

CRS-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
wgs84()
# CRS arguments: +init=epsg:4326
wgs84(TRUE)
# CRS arguments: +init=epsg:3395

# create a raster
r <- raster(nrows = 10, ncols = 10,
              xmn = 0, xmx = 10)
# by default wgs84
projection(r)
# [1] "+proj=longlat +datum=WGS84"

# change it to projected (not that you'd want to do this i.r.l.)
projection(r) <- wgs84(TRUE)
projection(r)
#[1] "+init=epsg:3395"

SEEG-Oxford/seegSDM documentation built on May 9, 2019, 11:08 a.m.