% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/polygons.R
\name{computeCenterFromPolygons}
\alias{computeCenterFromPolygons}
\title{computeCenterFromPolygons}
\usage{
computeCenterFromPolygons(polygons, coldata)
}
\arguments{
\item{polygons}{An `sf` object containing polygon data.}

\item{coldata}{A `DataFrame` containing the `colData` to which center
coordinates information will be added.}
}
\value{
A `DataFrame` with the added center information.
}
\description{
This function computes the center coordinates on x and y axis
from polygon data and adds it to the `colData`. It is necessary only for
Merfish.
}
\examples{
example(readPolygonsMerfish)
coldata <- computeCenterFromPolygons(polygons, colData(spe))
colData(spe) <- coldata
}
