Skip to content
Prev 22308 / 29559 Next

CRS for the European Biogeographical Regions in R

On Sun, Feb 8, 2015 at 12:54 PM, Roland Kaiser <kardinal.eros at gmail.com> wrote:
With the qpj file:

 > r = readOGR(".","BiogeoRegions2011")
OGR data source with driver: ESRI Shapefile
Source: ".", layer: "BiogeoRegions2011"
with 12 features and 5 fields
Feature type: wkbPolygon with 2 dimensions

Fails:

 > proj4string(r)
[1] NA

But if you simply rename the .qpj file as .prj then:

 > file.rename("BiogeoRegions2011.qpj","BiogeoRegions2011.prj")
[1] TRUE

Maybe...

 > r = readOGR(".","BiogeoRegions2011")
OGR data source with driver: ESRI Shapefile
Source: ".", layer: "BiogeoRegions2011"
with 12 features and 5 fields
Feature type: wkbPolygon with 2 dimensions

It all works:

 > proj4string(r)
[1] "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000
+ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"

Is a .qpj file a projection written by QGIS for some reason?

Barry