1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/compat-sf.R, R/sfc-writer.R, R/wkb-writer.R, 3% R/wkt-writer.R, R/writer.R, R/xy-writer.R 4\name{wk_writer.sfc} 5\alias{wk_writer.sfc} 6\alias{wk_writer.sf} 7\alias{sfc_writer} 8\alias{wkb_writer} 9\alias{wkt_writer} 10\alias{wk_writer} 11\alias{wk_writer.default} 12\alias{wk_writer.wk_wkt} 13\alias{wk_writer.wk_wkb} 14\alias{wk_writer.wk_xy} 15\alias{xy_writer} 16\title{Write geometry vectors} 17\usage{ 18\method{wk_writer}{sfc}(handleable, ...) 19 20\method{wk_writer}{sf}(handleable, ...) 21 22sfc_writer() 23 24wkb_writer(buffer_size = 2048L, endian = NA_integer_) 25 26wkt_writer(precision = 16L, trim = TRUE) 27 28wk_writer(handleable, ..., generic = FALSE) 29 30\method{wk_writer}{default}(handleable, ...) 31 32\method{wk_writer}{wk_wkt}(handleable, ..., precision = 16, trim = TRUE) 33 34\method{wk_writer}{wk_wkb}(handleable, ...) 35 36\method{wk_writer}{wk_xy}(handleable, ..., generic = FALSE) 37 38xy_writer() 39} 40\arguments{ 41\item{handleable}{A geometry vector (e.g., \code{\link[=wkb]{wkb()}}, \code{\link[=wkt]{wkt()}}, \code{\link[=xy]{xy()}}, 42\code{\link[=rct]{rct()}}, or \code{\link[sf:sfc]{sf::st_sfc()}}) for which \code{\link[=wk_handle]{wk_handle()}} is defined.} 43 44\item{...}{Passed to the writer constructor.} 45 46\item{buffer_size}{Control the initial buffer size used when writing WKB.} 47 48\item{endian}{Use 1 for little endian, 0 for big endian, or NA for 49system endian.} 50 51\item{precision}{If \code{trim} is \code{TRUE}, the total number of significant digits to keep 52for each result or the number of digits after the decimal place otherwise.} 53 54\item{trim}{Use \code{FALSE} to keep trailing zeroes after the decimal place.} 55 56\item{generic}{Use \code{TRUE} to obtain a writer that can write all geometry 57types.} 58} 59\value{ 60A \link[=wk_handle]{wk_handler}. 61} 62\description{ 63When writing transformation functions, it is often useful to know which 64handler should be used to create a (potentially modified) version 65of an object. Some transformers (e.g., \code{\link[=wk_vertices]{wk_vertices()}}) modify 66the geometry type of an object, in which case a generic writer is needed. 67This defaults to \code{\link[=wkb_writer]{wkb_writer()}} because it is fast and can handle 68all geometry types. 69} 70