% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api.R
\name{explode_sf}
\alias{explode_sf}
\title{Explode any sf object with an existing grouping column}
\usage{
explode_sf(
  sf_obj,
  region_col = "region",
  gamma_r = 3,
  gamma_l = 1.136,
  p = 1.25,
  alpha_r = NULL,
  alpha_l = NULL,
  refine = FALSE,
  refine_min_gap = NULL,
  refine_max_shift = NULL,
  refine_max_iter = 20,
  refine_step = 0.5,
  refine_within = c("region", "all"),
  allow_other = FALSE,
  fix_invalid = TRUE,
  centroid_fun = c("centroid", "point_on_surface"),
  plot = TRUE,
  export = NULL,
  label = "Custom Dataset",
  quiet = FALSE
)
}
\arguments{
\item{sf_obj}{Projected sf object (metric CRS)}

\item{region_col}{Name of the column defining groups}

\item{gamma_r}{Regional clearance coefficient (default 3.0)}

\item{gamma_l}{Local clearance coefficient (default 1.136)}

\item{p}{Distance scaling exponent (default 1.25)}

\item{alpha_r}{Optional manual override for regional separation (metres).
May be supplied independently of \code{alpha_l}.}

\item{alpha_l}{Optional manual override for local expansion (metres).
May be supplied independently of \code{alpha_r}.}

\item{refine}{If TRUE, apply a bounded collision-refinement pass after the
analytical displacement. Default is FALSE.}

\item{refine_min_gap}{Optional minimum boundary-to-boundary gap in map units.
If NULL and \code{refine = TRUE}, uses 2\% of the characteristic diameter.}

\item{refine_max_shift}{Optional maximum correction per feature in map units.
If NULL and \code{refine = TRUE}, uses 10\% of \code{alpha_r + alpha_l}.}

\item{refine_max_iter}{Maximum refinement iterations.}

\item{refine_step}{Fraction of each gap deficit corrected per iteration.}

\item{refine_within}{Refine pairs within each \code{"region"} (default) or across
\code{"all"} features.}

\item{allow_other}{If TRUE, permits "Other" units}

\item{fix_invalid}{If TRUE, auto-repairs invalid geometries}

\item{centroid_fun}{"centroid" (default) or "point_on_surface"}

\item{plot}{Print plots on return. Automatically suppressed when called
inside a live Shiny session; use \code{\link[=plot.exploded_map]{plot.exploded_map()}} inside
\code{renderPlot()} instead.}

\item{export}{NULL, TRUE, or file path}

\item{label}{Title for plots}

\item{quiet}{If \code{TRUE}, suppress all \code{message()} output. Default \code{FALSE}.}
}
\value{
An \code{exploded_map} S3 object
}
\description{
Explode any sf object with an existing grouping column
}
