/* private */ void Centroid::add(const Polygon& poly) { addShell(*poly.getExteriorRing()->getCoordinatesRO()); for (size_t i = 0; i < poly.getNumInteriorRing(); i++) { addHole(*poly.getInteriorRingN(i)->getCoordinatesRO()); } }
void CentroidArea::add(const Polygon *poly) { addShell(poly->getExteriorRing()->getCoordinatesRO()); for(size_t i=0, n=poly->getNumInteriorRing(); i<n; ++i) { addHole(poly->getInteriorRingN(i)->getCoordinatesRO()); } }
/*public*/ void CentroidArea::add(const CoordinateSequence *ring) { setBasePoint(ring->getAt(0)); addShell(ring); }