extract_coords: Coordinates extraction

View source: R/extract_coords.R

extract_coordsR Documentation

Coordinates extraction

Description

Extracts the bounding (edges) coordinates of a polygon object.

Usage

extract_coords(poly)

Arguments

poly

(An sf or S4 object) A polygon shapefile.

Details

Given a spatial polygon object, the function extracts its bounding coordinates.

Value

Returns 2-column xy coordinates representing points of directional change along the boundary.

Examples

#load boundary of Camden
load(file = system.file("extdata", "camden.rda",
package="stppSim"))
boundary = camden$boundary # get boundary
extract_coords(poly=boundary)

stppSim documentation built on Sept. 11, 2024, 9:14 p.m.