public class Ops
extends java.lang.Object
Constructor and Description |
---|
Ops() |
Modifier and Type | Method and Description |
---|---|
static JGeometry |
concaveHullDig(JGeometry geom, double digN)
Return the concave hull of the specified multipoint geometry.
|
static JGeometry |
convexHull(JGeometry geom)
Return the convex hull of the input geometry.
|
public static JGeometry convexHull(JGeometry geom) throws java.lang.Exception
Processing is done as if the points were in the plane and may not be appropriate for geodetic geometries.
geom
-java.lang.Exception
- "13050: unable to construct empty spatial object" if input has no points (May in future return an empty geometry)public static JGeometry concaveHullDig(JGeometry geom, double digN) throws java.lang.Exception
Uses the "dig" algorithm of Jin-Seo Park and Se-Jonh Oh, "A New Concave Hull Algorithm and Concaveness Measure for n-dimensional Datasets". Starting with a convex hull, interior points that are within (edge length)/digN of an edge will be added to the hull, "digging out" dents in the hull. Larger values of digN limit dents to be shallower.
Input geometry must be points only. Processing is done as if the points were on the plane and may not be appropriate for geodetic pointsets.
geom
- a multipoint geometrydigN
- non-negative parameter to the dig algorithm; larger values result in less "digging" of concavities. A digN of 0 will dig until all points are on the hull. Good values are data dependent; try a value of 3.0 to start.java.lang.Exception
- if the input points do not have a valid convex hull "13024: polygon has less than three segments" (convex hull is not a polygon) "13028: Invalid Gtype in the SDO_GEOMETRY object" (input is not a MULTIPOINT)