% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/st_spatial_join.R
\name{.st_spatial_join}
\alias{.st_spatial_join}
\title{Base function for spatial joins}
\usage{
.st_spatial_join(
  g1,
  g1_geomName = "geom",
  g1_cols_keep = "all",
  g2,
  g2_geomName = "geom",
  g2_cols_keep = "all",
  overwrite = FALSE,
  name,
  st_name,
  extra_args = NULL,
  ...
)
}
\arguments{
\item{g1}{A \code{\link{dbSpatial}} object.}

\item{g1_geomName}{\code{character}. The \code{geometry} column name in \code{g1}. Default: "geom".}

\item{g1_cols_keep}{\code{character vector}. The column names in \code{g1} to keep. Default: "all".}

\item{g2}{A \code{\link{dbSpatial}} object.}

\item{g2_geomName}{\code{character}. The \code{geometry} column name in \code{g2}. Default: "geom".}

\item{g2_cols_keep}{\code{character vector}. The column names in \code{g2} to keep. Default: "all".}

\item{overwrite}{\code{logical}. If \code{TRUE}, overwrite existing table. Default: \code{FALSE}.}

\item{name}{\code{character}. The name of the output table.}

\item{st_name}{\code{character}. The name of the spatial join function to use.}

\item{...}{Additional arguments passed to \code{duckdb::dbSendQuery()}.}
}
\value{
\code{dbSpatial} object
}
\description{
Internal base function for spatial joins.
}
\details{
Returns a VIEW of the spatial join. Must compute to save results.
}
\keyword{internal}
