afsc-gap-products / akgfmaps

Make AFSC bottom trawl survey maps and retrieve map layers
Other
17 stars 6 forks source link

EBS shelf and slope area boundaries do not align #102

Open sean-rohan-NOAA opened 7 months ago

sean-rohan-NOAA commented 7 months ago

Issue

@StanKotwicki-NOAA @Lukas-DeFilippo-NOAA @Lewis-Barnett-NOAA @Duane-Stevenson-NOAA @RebeccaHaehn-NOAA

Slope and shelf stratum areas do not align in the EBS. I would recommend addressing this issue prior to efforts to combine shelf and slope indices for the EBS survey modernization project.

library(akgfmaps)
library(cowplot)

slope_layers <- akgfmaps::get_base_layers(select.region = "ebs.slope", set.crs = "EPSG:3338")
ebs_layers <- akgfmaps::get_base_layers(select.region = "ebs", set.crs = "EPSG:3338")

bss1 <- akgfmaps::get_base_layers(select.region = "bssa1", set.crs = "EPSG:3338")[c("survey.strata", "plot.boundary")]
bss2 <- akgfmaps::get_base_layers(select.region = "bssa2", set.crs = "EPSG:3338")[c("survey.strata", "plot.boundary")]  
bss3 <- akgfmaps::get_base_layers(select.region = "bssa3", set.crs = "EPSG:3338")[c("survey.strata", "plot.boundary")]
bss4 <- akgfmaps::get_base_layers(select.region = "bssa4", set.crs = "EPSG:3338")[c("survey.strata", "plot.boundary")]
bss5 <- akgfmaps::get_base_layers(select.region = "bssa5", set.crs = "EPSG:3338")[c("survey.strata", "plot.boundary")]
bss6 <- akgfmaps::get_base_layers(select.region = "bssa6", set.crs = "EPSG:3338")[c("survey.strata", "plot.boundary")]

bss1$survey.strata$SURVEY <- bss2$survey.strata$SURVEY <- bss3$survey.strata$SURVEY <- bss4$survey.strata$SURVEY <- bss5$survey.strata$SURVEY <- bss6$survey.strata$SURVEY <- "EBS_SLOPE"

# 8. EBS shelf and slope survey don't snap together ------------------------------------------------
cowplot::plot_grid(
  ggplot() +
    geom_sf(data = dplyr::bind_rows(bss1$survey.strata, 
                                    ebs_layers$survey.strata),
            mapping = aes(fill = SURVEY),
            color = NA,
            alpha = 0.5) + 
    coord_sf(xlim = bss1$plot.boundary$x,
             ylim = bss1$plot.boundary$y) +
    scale_fill_manual(values = c("#E69F00", "#56B4E9", "#009E73")) +
    ggtitle(label = "Slope sub-area 1") +
    theme_bw() +
    theme(legend.position = "none"),
  ggplot() +
    geom_sf(data = dplyr::bind_rows(bss2$survey.strata, 
                                    ebs_layers$survey.strata),
            mapping = aes(fill = SURVEY),
            color = NA,
            alpha = 0.5) + 
    coord_sf(xlim = bss2$plot.boundary$x,
             ylim = bss2$plot.boundary$y) +
    scale_fill_manual(values = c("#E69F00", "#56B4E9", "#009E73")) +
    ggtitle(label = "Slope sub-area 2") +
    theme_bw() +
    theme(legend.position = "none"),
  ggplot() +
    geom_sf(data = dplyr::bind_rows(bss3$survey.strata, 
                                    ebs_layers$survey.strata),
            mapping = aes(fill = SURVEY),
            color = NA,
            alpha = 0.5) + 
    coord_sf(xlim = bss3$plot.boundary$x,
             ylim = bss3$plot.boundary$y) +
    scale_fill_manual(values = c("#E69F00", "#56B4E9", "#009E73")) +
    ggtitle(label = "Slope sub-area 3") +
    theme_bw() +
    theme(legend.position = "none"),
  ggplot() +
    geom_sf(data = dplyr::bind_rows(bss4$survey.strata, 
                                    ebs_layers$survey.strata),
            mapping = aes(fill = SURVEY),
            color = NA,
            alpha = 0.5) + 
    coord_sf(xlim = bss4$plot.boundary$x,
             ylim = bss4$plot.boundary$y) +
    scale_fill_manual(values = c("#E69F00", "#56B4E9", "#009E73")) +
    ggtitle(label = "Slope sub-area 4") +
    theme_bw() +
    theme(legend.position = "none"),
  ggplot() +
    geom_sf(data = dplyr::bind_rows(bss5$survey.strata, 
                                    ebs_layers$survey.strata),
            mapping = aes(fill = SURVEY),
            color = NA,
            alpha = 0.5) + 
    coord_sf(xlim = bss5$plot.boundary$x,
             ylim = bss5$plot.boundary$y) +
    scale_fill_manual(values = c("#E69F00", "#56B4E9", "#009E73")) +
    ggtitle(label = "Slope sub-area 5") +
    theme_bw() +
    theme(legend.position = "none"),
  ggplot() +
    geom_sf(data = dplyr::bind_rows(bss6$survey.strata, 
                                    ebs_layers$survey.strata),
            mapping = aes(fill = SURVEY),
            color = NA,
            alpha = 0.5) + 
    coord_sf(xlim = bss6$plot.boundary$x,
             ylim = bss6$plot.boundary$y) +
    scale_fill_manual(values = c("#E69F00", "#56B4E9", "#009E73")) +
    ggtitle(label = "Slope sub-area 6") +
    theme_bw() +
    theme(legend.position = "none")
)

image