% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grid_region_escape.R
\name{find_escape_points}
\alias{find_escape_points}
\title{Identify escape/safety points where roads cross the hazard-zone boundary}
\usage{
find_escape_points(
  hazard_zone,
  roads,
  study_area = NULL,
  region_buffer_m = 5000
)
}
\arguments{
\item{hazard_zone}{Hazard/evacuation zone.}

\item{roads}{Road/pathway network.}

\item{study_area}{Optional local study area used to crop candidate escape
points to a broader region around the study area.}

\item{region_buffer_m}{Buffer distance passed to \code{make_region_area()} when
\code{study_area} is supplied.}
}
\value{
A point \code{SpatVector} of candidate escape/safety points.
}
\description{
Intersects a road/pathway network with the boundary of the hazard zone and
converts the intersection geometry to points. These points represent candidate
exits from the hazard zone.
}
\examples{
r <- terra::rast(nrows = 4, ncols = 4, xmin = 0, xmax = 4, ymin = 0, ymax = 4,
  vals = 1, crs = "EPSG:3857")
zone <- terra::as.polygons(r, dissolve = TRUE)
roads <- terra::vect(matrix(c(-1, 2, 5, 2), ncol = 2, byrow = TRUE),
  type = "lines", crs = "EPSG:3857")
find_escape_points(zone, roads)
}
