import { Geometry, Point } from "../../internal"; /** * Calculate the centroid from surface based geometries. Implementation based on * the JTS (Java Topology Suite) CentroidArea. */ export declare class CentroidSurface { /** * Base point for triangles */ private _base; /** * Area sum */ private _area; /** * Sum of surface point locations */ private _sum; constructor(); constructor(geometry: Geometry); /** * Add a surface based dimension 2 geometry to the centroid total. Ignores * dimension 0 and 1 geometries. * * @param geometry * geometry */ add(geometry: Geometry): void; /** * Add polygons to the centroid total * * @param polygons polygons */ private addPolygons; /** * Add a polygon to the centroid total * * @param polygon * polygon */ private addPolygon; /** * Add a curve polygon to the centroid total * * @param curvePolygon * curve polygon */ private addCurvePolygon; /** * Add a line string to the centroid total * @param lineString line string */ private addLineString; /** * Add a line string hole to subtract from the centroid total * @param lineString line string */ private addHole; /** * Add or subtract a line string to or from the centroid total * @param positive true if an addition, false if a subtraction * @param lineString line string */ private addOrSubtractLine; /** * Add or subtract a triangle of points to or from the centroid total * @param positive true if an addition, false if a subtraction * @param point1 point 1 * @param point2 point 2 * @param point3 point 3 */ private addTriangle; /** * Calculate three times the centroid of the point triangle * @param point1 point 1 * @param point2 point 2 * @param point3 point 3 * @return 3 times centroid point */ private static centroid3; /** * Calculate twice the area of the point triangle * * @param point1 * point 1 * @param point2 * point 2 * @param point3 * point 3 * @return 2 times triangle area */ private static area2; /** * Get the centroid point * @return centroid point */ getCentroid(): Point; }