I'm having an odd problem such that when I reproject maps to a Mollweide projection in R using sp, I get additional lines stretching across the globe. What is going on here, and do you have any suggestions to fix it. Here's a reproductible example:
library(sp) library(maps) library(maptools) worldmap <- map("world", plot=F) plot(worldmap, type="l)
So far, so good. I get
So now I reproject. This is a CRS I'm using to be compatible with some other projects. Note how world-spanning lines then crop up.
worldmapLines <- map2SpatialLines(worldmap, proj4string=CRS("+proj=longlat +datum=WGS84")) worldM <- spTransform(worldmapLines, CRS("+proj=moll +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs")) plot(worldM)