I have two layers, US State boundaries and international boundaries for all countries. I know that due to different data sources and resolutions the lines won't match exactly but I'm getting a strange offset on the two layers (see below)...
the CRS match but the bounding boxes are different... How do I align these?
# Load packages library(dplyr) library(sp) library(rgdal) library(raster) library(rgeos) library(ggplot2) library(ggmap) # Read in and view GIS layers # Vectors lsib1 <- readOGR(dsn = "R:\\myGIS\\DoS\\Department_of_State_Large-Scale_International_Boundary_28LSIB29", layer = "Department of State Large-Scale International Boundary (LSIB)") states1 <- readOGR(dsn = "R:\\myGIS\\Census\\tl_2017_us_state", layer = "tl_2017_us_state") # Project layers to Albers crs(states1) crs(lsib1) lsib2 <- spTransform(lsib1, proj4string(states1)) crs(lsib2) # Visualization par(mfrow = c(1,1)) plot(states1) plot(lsib2, add = TRUE)
In response to comment: these layers align just fine (with minor incongruities) in GIS:
Above is my complete code.