% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distance_time_polygons.R
\name{make_evac_polygons}
\alias{make_evac_polygons}
\title{Create evacuation-distance and evacuation-time polygons}
\usage{
make_evac_polygons(
  distance_points,
  clip_area = NULL,
  walking_speed_mps = 1.22,
  region_name = NULL,
  distance_col = "DistToSafety",
  time_col = "EvacTimeAvg"
)
}
\arguments{
\item{distance_points}{Point output from \code{calc_min_distance_to_safety()}.}

\item{clip_area}{Optional polygon used to crop the Voronoi output.}

\item{walking_speed_mps}{Walking speed in meters per second.}

\item{region_name}{Optional region/municipality name stored in the output.}

\item{distance_col}{Name of the output distance column.}

\item{time_col}{Name of the output time column.}
}
\value{
A polygon \code{SpatVector}.
}
\description{
Creates Voronoi polygons from least-cost distance points, converts distance to
travel time, and optionally clips the output to an inundated road/study mask.
}
\examples{
pts <- terra::vect(
  data.frame(x = c(0, 1, 0, 1), y = c(0, 0, 1, 1), distance = c(0, 5, 10, 15)),
  geom = c("x", "y"),
  crs = "EPSG:3857"
)
clip <- terra::as.polygons(terra::rast(nrows = 2, ncols = 2, xmin = -1, xmax = 2,
  ymin = -1, ymax = 2, vals = 1, crs = "EPSG:3857"), dissolve = TRUE)
make_evac_polygons(pts, clip_area = clip)
}
