5.9 Clipping
5.9.1 Intersection
= st_intersection(nz, nz_shift_sf) nz_intersection
## Warning: attribute variables are assumed to be spatially constant throughout
## all geometries
|>
nz ggplot() +
geom_sf(fill = "red", alpha = 0.25) +
geom_sf(fill = "blue", alpha = 0.25,
data = nz_shift_sf) +
geom_sf(fill = "purple",
data = nz_intersection) +
labs(title = "New Zealand",
subtitle = "Intersection",
caption = "GeoComputation with R book club") +
theme_minimal()