% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial_sf.R
\name{align_spatial_to_panel}
\alias{align_spatial_to_panel}
\title{Reorder spatial rows to match panel ID order}
\usage{
align_spatial_to_panel(spatial, id_map)
}
\arguments{
\item{spatial}{An `sf` object containing at minimum the rows referenced in
`id_map`.}

\item{id_map}{A named integer vector as produced by `build_id_map()`.
Names are unit IDs (character); values are 1-based row indices into
`spatial`.}
}
\value{
An `sf` object with rows reordered to match `id_map`.
}
\description{
Given a named integer vector `id_map` (names = unit IDs, values = row
indices in `spatial`) produced by `build_id_map()`, this function reorders
the rows of `spatial` so that they align with the panel data ordering.
}
\keyword{internal}
