DK11 for Delphi | GisTopology.TGIS_Topology.ConvexHull | Overloads | Constructors | Methods | Properties | Events
Creates a convex hull based on the provided shape.
// Delphi public function ConvexHull( const _shape : TGIS_Shape ) : TGIS_ShapePolygon; overload;
// C++ Builder public: TGIS_ShapePolygon* ConvexHull( TGIS_Shape* const _shape ) /* overload */;
Name | Type | Description |
---|---|---|
_shape | TGIS_Shape | source shape |
Type | Description |
---|---|
TGIS_ShapePolygon | convex hull as a polygon |
The difference between a convex and a concave hull:
Convex Hull | Concave Hull |
var topologyObj : TGIS_Topology ; layerObj : TGIS_LayerVector ; shpA : TGIS_ShapePolygon ; shpB : TGIS_ShapePolygon ; GIS: TGIS_ViewerWnd; procedure MyClass.Hull(); var tmp2 : TGIS_ShapePolygon ; begin layerObj.RevertAll ; tmp2 := topologyObj.ConvexHull( shpA, shpB) ; if assigned( tmp2 ) then begin layerObj.AddShape( tmp2 ) ; tmp2.Free ; end ; GIS.Update; end;