Skip to content

Instantly share code, notes, and snippets.

@jlehtoma
Created April 3, 2012 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlehtoma/2292662 to your computer and use it in GitHub Desktop.
Save jlehtoma/2292662 to your computer and use it in GitHub Desktop.
Plotting sp-objects to Google Maps with different CRSs
library(sorvi)
library(rgdal)
library(plotGoogleMaps)
data(MML)
shp <- MML[["1_milj_Shape_etrs_shape"]][["kunta1_p"]]
proj4string(shp)<-("+init=epsg:3047")
shp2 <- spTransform(shp, CRS("+proj=longlat +datum=WGS84"))
plotGoogleMaps(shp2, zcol="Kunta_ni1")
proj4string(shp)<-("+init=epsg:3035")
shp3 <- spTransform(shp, CRS("+proj=longlat +datum=WGS84"))
plotGoogleMaps(shp3, zcol="Kunta_ni1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment