This is a follow-up post to a recent question on StackOverflow. I'm now facing a GIS problem rather than a coding one.
I'm working with a DEM from this source, which has the following projection information:
+proj=laea +lat_0=-100 +lon_0=6370997 +x_0=45 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0.
I need to
projectRaster(mydem, worldclim) to fit worldclim data from this source, which has the following projection information:
+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0.
However, when I reproject
worldclim as a template, I run into major alignment issues.
mydem is a map of North America in Lambert azumithal equal-area and
worldclim is the full globe in lat/lon, so I'm wondering if there is something going on extent-wise that might be causing the problem.
Here is an image of the reprojected DEM, calculated using
mydem.lonlat <- projectRaster(mydem, worldclim)
I followed Dr. Hijman's approach in this post but I don't think rotation is the issue here. There are a few other related questions here and here but they are unanswered and still don't address my exact issue.
extent(worldclim) are identical, as are
proj4string() for both layers... so they definitely align in plotting space; there's just clearly an issue with geographic space.