when I reproject coastscoarse to Robinson using spTransform I get an unwanted horizontal extra line

Viewed 69

When I run this code

library(rworldmap)
data("coastsCoarse")
plot(coastsCoarse)
RobinsonProj <-  "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"
crsLoc <- CRS(RobinsonProj)
coastsCoarse <- sp::spTransform(coastsCoarse, crsLoc)
plot(coastsCoarse)

I get one plot that looks like the coasts of the continents. The second plot, after projecting into Robinson returns a horizontal line across the top of the plot of the continents and the following warning.

Warning message: In spTransform(xSP, CRSobj, ...) : NULL source CRS comment, falling back to PROJ string

How do I get rid of that line in the projected version. Extra credit for an explanation of how to get rid of Antarctica.

0 Answers
Related