% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pkg-sf.R, R/sfc-writer.R, R/wkb-writer.R,
%   R/wkt-writer.R, R/writer.R, R/xy-writer.R
\name{wk_writer.sfc}
\alias{wk_writer.sfc}
\alias{wk_writer.sf}
\alias{sfc_writer}
\alias{wkb_writer}
\alias{wkt_writer}
\alias{wk_writer}
\alias{wk_writer.default}
\alias{wk_writer.wk_wkt}
\alias{wk_writer.wk_wkb}
\alias{wk_writer.wk_xy}
\alias{xy_writer}
\title{Write geometry vectors}
\usage{
\method{wk_writer}{sfc}(handleable, ...)

\method{wk_writer}{sf}(handleable, ...)

sfc_writer(promote_multi = FALSE)

wkb_writer(buffer_size = 2048L, endian = NA_integer_)

wkt_writer(precision = 16L, trim = TRUE)

wk_writer(handleable, ..., generic = FALSE)

\method{wk_writer}{default}(handleable, ...)

\method{wk_writer}{wk_wkt}(handleable, ..., precision = 16, trim = TRUE)

\method{wk_writer}{wk_wkb}(handleable, ...)

\method{wk_writer}{wk_xy}(handleable, ..., generic = FALSE)

xy_writer()
}
\arguments{
\item{handleable}{A geometry vector (e.g., \code{\link[=wkb]{wkb()}}, \code{\link[=wkt]{wkt()}}, \code{\link[=xy]{xy()}},
\code{\link[=rct]{rct()}}, or \code{\link[sf:sfc]{sf::st_sfc()}}) for which \code{\link[=wk_handle]{wk_handle()}} is defined.}

\item{...}{Passed to the writer constructor.}

\item{promote_multi}{Use TRUE to promote all simple geometries to a multi
type when reading to sfc. This is useful to increase the likelihood that
the sfc will contain a single geometry type.}

\item{buffer_size}{Control the initial buffer size used when writing WKB.}

\item{endian}{Use 1 for little endian, 0 for big endian, or NA for
system endian.}

\item{precision}{If \code{trim} is \code{TRUE}, the total number of significant digits to keep
for each result or the number of digits after the decimal place otherwise.}

\item{trim}{Use \code{FALSE} to keep trailing zeroes after the decimal place.}

\item{generic}{Use \code{TRUE} to obtain a writer that can write all geometry
types.}
}
\value{
A \link[=wk_handle]{wk_handler}.
}
\description{
When writing transformation functions, it is often useful to know which
handler should be used to create a (potentially modified) version
of an object. Some transformers (e.g., \code{\link[=wk_vertices]{wk_vertices()}}) modify
the geometry type of an object, in which case a generic writer is needed.
This defaults to \code{\link[=wkb_writer]{wkb_writer()}} because it is fast and can handle
all geometry types.
}
