I downloaded the TDWG level4 shape from http://www1.kew.org/gis/tdwg/index.html. This shape has a WGS84 projection. I need to reproject this layer to European LAEA or CRS("+init=epsg:3035").
I used the following code:
TDWG4 <- readOGR("D:/GIS/Administrative/world/TDWG/level4/level4.shp", layer="level4")
TDWG4.LAEA <- spTransform(TDWG4, CRS("+init=epsg:3035"))
and get the following error:
Error in .spTransform_Polygon(input[[i]], to_args = to_args, from_args = from_args, : failure in Polygons 37 Polygon 1 points In addition: Warning message: In .spTransform_Polygon(input[[i]], to_args = to_args, from_args = from_args, : 361 projected point(s) not finite
Any suggestions to solve this issue?
Use
sf
as this has largely supersededrgdal/rgeos
:We now have to clip the area because the 3035 EPSG is only relevant for Europe:
Bounding box for EPSG 3035 is from: http://spatialreference.org/ref/epsg/etrs89-etrs-laea/
Now plot: