I am trying to change or assign the projection of a Germany-Shapefile from NA
to +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
, but somehow it doesn't work well.
Reproducible Example: Shapefile and other files can be downloaded here:
What I tried is the following:
library(maptools)
library(sp)
library(rgeos)
library(rgdal)
projection.x <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0")
mapG <- readShapePoly("vg2500_lan.shp", verbose=TRUE, proj4string=projection.x)
summary(mapG)
mapG <- spTransform(mapG, CRS("+proj=longlat +ellps=WGS84 +datum=WGS84"))
So, the problem is I cannot plot my observations on the map. See below
The ponits were detected using geocode
function from ggmap
package.
Any idea how to change the projection of the shapefile or the projection of the google coordinates would be highly appreciated!