powered by
Extracts the bounding (edges) coordinates of a polygon object.
extract_coords(poly)
Returns 2-column xy coordinates representing points of directional change along the boundary.
(An sf or S4 object) A polygon shapefile.
Given a spatial polygon object, the function extracts its bounding coordinates.
#load boundary of Camden load(file = system.file("extdata", "camden.rda", package="stppSim")) boundary = camden$boundary # get boundary extract_coords(poly=boundary)
Run the code above in your browser using DataLab