I have downloaded a shape file (Marine Ecoregions (last one on the page)) from the nature conservancy http://maps.tnc.org/gis_data.html
I am then using R and the sf package to project this shapefile. If I plot this map on NAD83, WGS84 etc., the map looks good. If I project it to Eckert4, Lambert Azithmuthal, or Mollweide I get banding across the map.
Any idea why this happens?
Here is some reproducible code:
You will need to download the shapefile from the link above and add them to same folder as the function below
# set chooseProjection to one of the following" "WGS84","Eckert4","molli","lambertaz"
project_maps <- function(chooseProjection) {
projection <- switch(chooseProjection,
"WGS84" = "+init=epsg:4326 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0",
"NAD83" = "+init=epsg:4269 +proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs +towgs84=0,0,0",
"NAD27" = "+init=epsg:4267 +proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
"Eckert4" = "+proj=eck4",
"molli" = "+proj=moll",
"tranmerc"= "+proj=tmerc",
"lambertaz"="+proj=laea +x_0=0 +y_0=0 +lon_0=0 +lat_0=0")
MEco <- sf::st_read(dsn=here::here(),layer="meow_ecos",quiet=T)
MEco <- sf::st_transform(MEco,crs=projection)
# plot ecoregion
plotMEco <- ggplot2::ggplot() +
ggplot2::geom_sf(data = MEco, ggplot2::aes(fill = ECOREGION)) +
ggplot2::theme(legend.position = "none") +
ggplot2::ggtitle("Marine Ecoregions")
print(plotMEco)
}
Sample figures:
If i crop the bounding box using
MEco <- sf::st_crop(MEco,c(ymin = -89.99, ymax = 89.99, xmin=-179.99, xmax=179.99))
Then the Eckert4 projection displays just fine. However the Lambert Azithmuthal is still strange.




plot(ecor$geometry[a:b])then narrowaandbdown by halves. Might look at possible fixes tomorrow. – Spacedman Jul 02 '19 at 18:17