Purpose
Returns a region object that represents the convex hull polygon based on the nodes from the input object. The convex hull polygon can be thought of as an operator that places a rubber band around all of the points. It will consist of the minimal set of points such that all other points lie on or inside the polygon. The polygon will be convex―no interior angle can be greater than 180 degrees. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
ConvexHull( inputobject )
inputobject is an object expression.
Return Value
Returns a region object.
Description
The ConvexHull() function returns a region representing the convex hull of the set of points comprising the input object. The ConvexHull() function operates on one single object at a time. To create a convex hull around a set of objects, use the Create Object As ConvexHull statement.
Example
The following program selects New York from the States file, then creates a ConvexHull surrounding the selection.
Dim Resulting_object as object
select * from States
where State_Name = "New York"
Resulting_object = ConvexHull(selection.obj)
Insert Into States(obj) Values (Resulting_object)
See Also: