Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIN QMA polygons don't line up with statistical areas #12

Open
quantifish opened this issue Dec 8, 2020 · 1 comment
Open

LIN QMA polygons don't line up with statistical areas #12

quantifish opened this issue Dec 8, 2020 · 1 comment

Comments

@quantifish
Copy link
Owner

quantifish commented Dec 8, 2020

aa <- nz_fisheries_general_statistical_areas %>%
  dplyr::select(Statistica) %>%
  st_transform(crs = proj_nzsf()) %>%
  # st_snap(x = ., y = ., tolerance = 0.0001) %>%
  # st_simplify(dTolerance = 1) %>%
  st_union(by_feature = TRUE) %>%
  mutate(area = case_when(
    Statistica %in% c(401:412, "049", "050", "051", "052") ~ "a",
    Statistica %in% 601:625 ~ "b",
    TRUE ~ as.character("c")
  )) %>%
  group_by(area) %>%
  summarize(geometry = st_union(geometry))

ggplot() +
  geom_sf(data = aa, aes(fill = area)) +
  plot_qma(qma = "LIN", fill = "transparent") +
  # plot_statistical_areas(area = "stat area", fill = "transparent") +
  # plot_coast(resolution = "med", fill = "forestgreen", colour = "black", size = 0.3) +
  annotation_north_arrow(location = "tl", which_north = "true", style = north_arrow_nautical)

image

Also, there are some polygon slivers in the north island which I couldn't get rid of with snap or simplify.

@quantifish
Copy link
Owner Author

r-spatial/sf#547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant