Skip to content
Prev 22298 / 29559 Next

CRS for the European Biogeographical Regions in R

Hi Barbara,

the data set projection is EPSG:3035 - ETRS89 / ETRS-LAEA.

llibrary(sp)
library(rgdal)

#	the projection information is given in the *.qpj file
#	unfortunately, it is not read from the dataset by the OGR driver
#	we have do define it manually by specifing argument p4s
pg <- readOGR(dsn = "BiogeoRegions2011_shapefile",
	layer = "BiogeoRegions2011", p4s = "+init=epsg:3035")
proj4string(pg)

#	example points
pt <- data.frame(x = c(14,28), y = c(41, 59), id = 1:2)
coordinates(pt) <- ~x+y
proj4string(pt) <- CRS("+init=epsg:4326")
proj4string(pt)

#	project to CRS of pg	
pt <- spTransform(pt, CRS("+init=epsg:3035"))

over(pt, pg)

Cheers, Roli