1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/vertex-filter.R 3\name{wk_vertices} 4\alias{wk_vertices} 5\alias{wk_coords} 6\alias{wk_vertex_filter} 7\title{Extract vertices} 8\usage{ 9wk_vertices(handleable, ...) 10 11wk_coords(handleable, ...) 12 13wk_vertex_filter(handler, add_details = FALSE) 14} 15\arguments{ 16\item{handleable}{A geometry vector (e.g., \code{\link[=wkb]{wkb()}}, \code{\link[=wkt]{wkt()}}, \code{\link[=xy]{xy()}}, 17\code{\link[=rct]{rct()}}, or \code{\link[sf:sfc]{sf::st_sfc()}}) for which \code{\link[=wk_handle]{wk_handle()}} is defined.} 18 19\item{...}{Passed to the \code{\link[=wk_handle]{wk_handle()}} method.} 20 21\item{handler}{A \link[=wk_handle]{wk_handler} object.} 22 23\item{add_details}{Use \code{TRUE} to add a "wk_details" attribute, which 24contains columns \code{feature_id}, \code{part_id}, and \code{ring_id}.} 25} 26\value{ 27\itemize{ 28\item \code{wk_vertices()} extracts vertices and returns the in the same format as 29the handler 30\item \code{wk_coords()} returns a data frame with columns columns \code{feature_id} 31(the index of the feature from whence it came), \code{part_id} (an arbitrary 32integer identifying the point, line, or polygon from whence it came), 33\code{ring_id} (an arbitrary integer identifying individual rings within 34polygons), and one column per coordinate (\code{x}, \code{y}, and/or \code{z} and/or \code{m}). 35} 36} 37\description{ 38These functions provide ways to extract individual coordinate values. 39Whereas \code{wk_vertices()} returns a vector of coordinates as in the same 40format as the input, \code{wk_coords()} returns a data frame with coordinates 41as columns. 42} 43\examples{ 44wk_vertices(wkt("LINESTRING (0 0, 1 1)")) 45wk_coords(wkt("LINESTRING (0 0, 1 1)")) 46 47} 48