public class FullConvexHull extends Object
Geometry.
The convex hull is the smallest convex Geometry that contains all the
points in the input Geometry.
Uses the Graham Scan algorithm. For the workaround of Poly2Tri the convex hull must not be simplified
| Constructor and Description |
|---|
FullConvexHull(org.locationtech.jts.geom.Coordinate[] pts,
org.locationtech.jts.geom.GeometryFactory geomFactory)
Create a new convex hull construction for the input
Coordinate array. |
FullConvexHull(org.locationtech.jts.geom.Geometry geometry)
Create a new convex hull construction for the input
Geometry. |
| Modifier and Type | Method and Description |
|---|---|
org.locationtech.jts.geom.Geometry |
getConvexHull()
Returns a
Geometry that represents the convex hull of the input
geometry. |
protected org.locationtech.jts.geom.Coordinate[] |
toCoordinateArray(Stack stack)
An alternative to Stack.toArray, which is not present in earlier versions
of Java.
|
public FullConvexHull(org.locationtech.jts.geom.Geometry geometry)
Geometry.geometry - public FullConvexHull(org.locationtech.jts.geom.Coordinate[] pts,
org.locationtech.jts.geom.GeometryFactory geomFactory)
Coordinate array.public org.locationtech.jts.geom.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 org.locationtech.jts.geom.Coordinate[] toCoordinateArray(Stack stack)
stack - Copyright © 2019 CNRS. All rights reserved.