21 #include <geos/export.h>
22 #include <geos/geom/Coordinate.h>
30 class CoordinateSequence;
99 std::unique_ptr<geom::CoordinateXY> areaBasePt;
100 geom::CoordinateXY triangleCent3;
101 geom::CoordinateXY cg3;
102 geom::CoordinateXY lineCentSum;
103 geom::CoordinateXY ptCentSum;
115 void setAreaBasePoint(
const geom::CoordinateXY& basePt);
123 void addTriangle(
const geom::CoordinateXY& p0,
const geom::CoordinateXY& p1,
const geom::CoordinateXY& p2,
124 bool isPositiveArea);
131 static void centroid3(
const geom::CoordinateXY& p1,
const geom::CoordinateXY& p2,
const geom::CoordinateXY& p3,
132 geom::CoordinateXY& c);
138 static double area2(
const geom::CoordinateXY& p1,
const geom::CoordinateXY& p2,
const geom::CoordinateXY& p3);
152 void addPoint(
const geom::CoordinateXY& pt);
Computes the centroid of a Geometry of any dimension.
Definition: Centroid.h:60
Centroid(const geom::Geometry &geom)
Creates a new instance for computing the centroid of a geometry.
Definition: Centroid.h:78
static bool getCentroid(const geom::Geometry &geom, geom::CoordinateXY ¢)
Computes the centroid point of a geometry.
bool getCentroid(geom::CoordinateXY ¢) const
Gets the computed centroid.
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25