I have several global map layers I am plotting using ggplot() + geom_sf() + etc. All data is "+proj=longlat +datum=WGS84 +no_defs". My goal is to have Eurasia be a contiguous land mass. This means having the prime meridian be at +12 as opposed to the default 0. An example with ocean data:
library(ggplot2)
library(sf)
library(rnaturalearth)
oceans <- ne_download(scale = 110, type = 'ocean', category = 'physical', returnclass = "sf")
ggplot() + geom_sf(data=oceans)
#check CRS
st_crs(oceans)$proj4string
[1] "+proj=longlat +datum=WGS84 +no_defs"
#st_transform with pm at 12 so Eurasia is one blob
oceans2 <- st_transform(oceans, crs = "+proj=longlat +datum=WGS84 +pm=12 +no_defs")
ggplot() + geom_sf(data=oceans2)
#check CRS
st_crs(oceans2)$proj4string
[1] "+proj=longlat +ellps=WGS84 +pm=12 +no_defs"
#unclear on why this is not "+proj=longlat +datum=WGS84 +pm=12 +no_defs"
I am unclear how to remove the white and black lines (vertical and horizontal) shown in the shifted image.