sp_punch | R Documentation |
Punching could also be called a reverse-clip or an erasing process.
sp_punch(sp_base, sp_hole, features = FALSE)
sp_base |
SpatialPolygons which will have a hole punched into it. |
sp_hole |
SpatialPolygons which will be represented as a hole in
|
features |
Should |
Stuart K. Grange
## Not run:
# Load coastline
sp_uk <- sp_read("uk_coastline")
# Load a drawn polygon
data_drawn <- read.delim("drawn_polygon.txt")
# Promote to spatial
sp_drawn <- data_frame_to_polygon(data_drawn)
# Punch a hole in the coastline object
sp_uk_punch <- sp_punch(sp_uk, sp_drawn)
# Check
plot(sp_uk_punch)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.