Learn R Programming

mapmisc (version 1.7.0)

crsMerc: Spherical Mercator projection

Description

Defines CRS's for the Spherical Mercator and long-lat projections.

Usage

crsMerc
crsLL

Arguments

Value

Objects of class CRS.

Details

CRS objects for epsg:4326 (long-lat) and the spherical Mercator projection used by web mapping services. Using epsg codes requires the rgdal package to be installed, and crsLL is intended as a replacement for CRS("+init=epsg:4326") when rgdal is not guaranteed to be available.

References

https://en.wikipedia.org/wiki/Web_Mercator, http://spatialreference.org/ref/epsg/4326/

See Also

CRS, showEPSG

Examples

Run this code
# NOT RUN {
crsMerc
if(require('rgdal', quietly=TRUE))
	CRS("+init=epsg:3857")

crsLL
if(require('rgdal', quietly=TRUE)) {
	CRS("+init=epsg:4326")

	rgdal::showEPSG("+proj=longlat")
	rgdal::showEPSG(as.character(crsLL))
}


# }

Run the code above in your browser using DataLab