# NOT RUN {
crsMerc
try(CRS("+init=epsg:3857"), silent=TRUE)
crsLL
try(CRS("+init=epsg:4326"), silent=TRUE)
if(require('rgdal', quietly=TRUE)){
xOrig = SpatialPoints(cbind(-40,30), proj4string=crsLL)
xMerc = spTransform(xOrig, crsMerc)
xLL = spTransform(xMerc, crsLL)
coordinates(xOrig)
coordinates(xMerc)
coordinates(xLL)
}
# }
Run the code above in your browser using DataLab