% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial_sf.R
\name{extract_coordinates}
\alias{extract_coordinates}
\title{Extract representative XY coordinates from an sf object}
\usage{
extract_coordinates(spatial)
}
\arguments{
\item{spatial}{An `sf` object.}
}
\value{
A numeric matrix with columns `X` and `Y`, one row per feature.
}
\description{
For POINT geometries the point coordinates are returned directly. For
all other geometry types (POLYGON, MULTIPOLYGON, etc.) `sf::st_centroid()`
is used to derive a representative point, with warnings suppressed (they
are typically non-actionable geographic-CRS notes).
}
\keyword{internal}
