Description Usage Arguments Value See Also Examples
A helper function returning a CRS
object giving the WGS84 coordinate reference, either projected or unprojected.
1 |
projected |
Whether to return the projected WGS84 reference, defaults to the unprojected. |
An object of class CRS
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"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.