% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial.R
\name{st_write.vectra_node}
\alias{st_write.vectra_node}
\title{Stream a vectra node's geometry to a vector file}
\usage{
\method{st_write}{vectra_node}(
  obj,
  dsn,
  layer = NULL,
  ...,
  geom = "geometry",
  crs = NULL,
  delete_dsn = FALSE,
  quiet = TRUE
)
}
\arguments{
\item{obj}{A \code{vectra_node} whose rows carry a hex-WKB geometry column (from
\code{\link[=spatial_overlay]{spatial_overlay()}}, a grouped \code{\link[=slice_min]{slice_min()}} / \code{\link[=slice_max]{slice_max()}} resolution, a
\code{.vtr} scan, ...). It is consumed by the stream.}

\item{dsn}{Destination data source name (file path).}

\item{layer}{Layer name. \code{NULL} lets \pkg{sf} derive it from \code{dsn}.}

\item{...}{Unused; for S3 generic compatibility.}

\item{geom}{Name of the hex-WKB geometry column. Default \code{"geometry"}.}

\item{crs}{CRS to tag the output with. \code{NULL} takes the CRS carried on the
node.}

\item{delete_dsn}{If \code{TRUE}, remove an existing \code{dsn} before writing.}

\item{quiet}{Passed to \code{\link[sf:st_write]{sf::st_write()}}.}
}
\value{
The \code{dsn}, invisibly.
}
\description{
An \code{\link[sf:st_write]{sf::st_write()}} method (also reached through \code{\link[sf:write_sf]{sf::write_sf()}}) for a
\code{vectra_node}: writes the result a batch at a time, appending each, so the
whole layer is never held in memory. This is the streaming counterpart to
\code{collect_sf(x) |> sf::st_write(...)} -- that route materializes every feature
as an \code{sf} object first, which for a multi-million-feature result dominates
memory; this route's peak is one batch.
}
\seealso{
\code{\link[=collect_sf]{collect_sf()}} to materialize the whole result as one \code{sf} object.
}
