% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grid_region_escape.R
\name{make_evac_grid}
\alias{make_evac_grid}
\title{Create an evacuation grid}
\usage{
make_evac_grid(hazard_zone, resolution)
}
\arguments{
\item{hazard_zone}{Hazard/evacuation zone as \code{SpatVector}, \code{SpatRaster}, or file path.}

\item{resolution}{Grid cell resolution in map units. Use meters when data are
in a projected CRS. Can be length 1 or 2.}
}
\value{
A polygon \code{SpatVector} grid clipped/masked to the hazard zone.
}
\description{
Creates polygon grid cells over a hazard/evacuation zone and masks the grid to
the zone. The resulting cells can be intersected with buffered roads to create
road-based origin points.
}
\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)
make_evac_grid(zone, resolution = 1)
}
