geos::algorithm::ConvexHull Class Reference

#include <ConvexHull.h>

List of all members.

Public Member Functions

 ConvexHull (const geom::Geometry *newGeometry)
geom::GeometrygetConvexHull ()


Detailed Description

Computes the convex hull of a Geometry.

The convex hull is the smallest convex Geometry that contains all the points in the input Geometry.

Uses the Graham Scan algorithm.

Last port: algorithm/ConvexHull.java rev. 1.26 (JTS-1.7)


Constructor & Destructor Documentation

geos::algorithm::ConvexHull::ConvexHull ( const geom::Geometry newGeometry  ) 

Create a new convex hull construction for the input Geometry.


Member Function Documentation

geom::Geometry* geos::algorithm::ConvexHull::getConvexHull (  ) 

Returns a Geometry that represents the convex hull of the input geometry. The returned geometry contains the minimal number of points needed to represent the convex hull. In particular, no more than two consecutive points will be collinear.

Returns:
if the convex hull contains 3 or more points, a Polygon; 2 points, a LineString; 1 point, a Point; 0 points, an empty GeometryCollection.


The documentation for this class was generated from the following file:
Generated on Fri Mar 27 04:53:11 2009 for GEOS by  doxygen 1.5.4