|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vividsolutions.jts.algorithm.ConvexHull
public class ConvexHull
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.
Constructor Summary | |
---|---|
ConvexHull(Coordinate[] pts,
GeometryFactory geomFactory)
Create a new convex hull construction for the input Coordinate array. |
|
ConvexHull(Geometry geometry)
Create a new convex hull construction for the input Geometry . |
Method Summary | |
---|---|
Geometry |
getConvexHull()
Returns a Geometry that represents the convex hull of the input
geometry. |
protected Coordinate[] |
toCoordinateArray(java.util.Stack stack)
An alternative to Stack.toArray, which is not present in earlier versions of Java. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConvexHull(Geometry geometry)
Geometry
.
public ConvexHull(Coordinate[] pts, GeometryFactory geomFactory)
Coordinate
array.
Method Detail |
---|
public Geometry getConvexHull()
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.
Polygon
;
2 points, a LineString
;
1 point, a Point
;
0 points, an empty GeometryCollection
.protected Coordinate[] toCoordinateArray(java.util.Stack stack)
|
JTS Topology Suite version 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |