% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prepare.R
\name{clean_roads}
\alias{clean_roads}
\title{Clean a road/pathway network}
\usage{
clean_roads(roads, exclude = NULL, target_crs = NULL)
}
\arguments{
\item{roads}{A \code{SpatVector} or path to a vector layer.}

\item{exclude}{Optional named list with \code{field} and \code{values}, for example
\code{list(field = "man_made", values = "pier")}.}

\item{target_crs}{Optional output CRS.}
}
\value{
A cleaned \code{SpatVector}.
}
\description{
Removes user-specified features from a road/pathway layer. This is useful for
excluding piers, tunnels, private ways, or other features that should not be
used in pedestrian evacuation modeling.
}
\examples{
roads <- terra::vect(
  list(
    matrix(c(0, 0, 0, 1), ncol = 2, byrow = TRUE),
    matrix(c(1, 0, 1, 1), ncol = 2, byrow = TRUE)
  ),
  type = "lines",
  crs = "EPSG:3857"
)
roads$kind <- c("road", "pier")
clean_roads(roads, exclude = list(field = "kind", values = "pier"))
}
