% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generics.R, R/accessors.R
\name{st_x}
\alias{st_x}
\alias{st_x,dbSpatial-method}
\title{Get X coordinate}
\usage{
st_x(x, ...)

\S4method{st_x}{dbSpatial}(x, ...)
}
\arguments{
\item{x}{\code{\link{dbSpatial}} object}

\item{...}{additional arguments}
}
\value{
\code{\link{dbSpatial}} object with X coordinate column
}
\description{
Returns the X coordinate of a point.
}
\section{Methods (by class)}{
\itemize{
\item \code{st_x(dbSpatial)}: Method for \code{dbSpatial} objects

}}
\examples{
\donttest{
if (interactive() && requireNamespace("duckdb", quietly = TRUE)) {
  point <- sf::st_sf(id = 1, geom = sf::st_sfc(sf::st_point(c(1, 2))))
  duckdb_conn <- DBI::dbConnect(duckdb::duckdb(), ":memory:")
  DBI::dbExecute(duckdb_conn, "SET threads = 1")
  x <- as_dbSpatial(point, conn = duckdb_conn, name = "point",
                    overwrite = TRUE)
  st_x(x)
  DBI::dbDisconnect(duckdb_conn, shutdown = TRUE)
}
}
}
\seealso{
Other accessors: 
\code{\link{st_npoints}()},
\code{\link{st_y}()}
}
\concept{accessors}
