DK for Delphi | GisLayerVector.TGIS_Shape.Centroid | Constructors | Fields | Methods | Properties
Calculates the geometric centroid of the shape.
// Delphi public function Centroid : TGIS_Point; virtual;
// C++ Builder public: virtual TGIS_Point* Centroid(void);
| Type | Description |
|---|---|
| TGIS_Point | Centroid point in the shape's coordinate system. For polygons, the centroid may lie outside the shape. |
PURPOSE: Compute the geometric center of a vector shape for labeling, symbol placement, spatial analysis, or feature summarization.
BEHAVIOR: For polygon shapes, returns the area-weighted centroid. For line shapes, returns a line-based center point. For point shapes, returns the point itself.
CONSTRAINTS: The centroid is a geometric result and is not guaranteed to lie inside the shape, especially for concave polygons or multipart geometries.