Format
SDO_GEOM.SDO_CONCAVEHULL( geom IN SDO_GEOMETRY, tol IN NUMBER ) RETURN SDO_GEOMETRY;
or
SDO_GEOM.SDO_CONCAVEHULL( geom IN SDO_GEOMETRY, tol IN NUMBER, radius OUT NUMBER ) RETURN SDO_GEOMETRY;
Description
Returns a polygon-type object that represents the concave hull of a geometry object.
Parameters
Geometry object.
Tolerance value (see Tolerance).
Output parameter to hold the radius of the circumcircle of the triangles created internally (using Delaunay triangulations) in computing the concave hull.
Usage Notes
The concave hull is a polygon that represents the area of the input geometry, such as a collection of points. With complex input geometries, the concave hull is typically significantly smaller in area than the convex hull.
This function takes all coordinates from the input geometry, uses them to compute Delaunay triangulations, and computes a concave hull. It returns only an exterior ring; any interior rings are discarded.
This function uses the alpha shape in computing the concave hull. By contrast, the SDO_GEOM.SDO_CONCAVEHULL_BOUNDARY function uses exterior boundary points.
The format with the radius
parameter returns a radius value that can be useful if you plan to call the SDO_GEOM.SDO_ALPHA_SHAPE function.
An exception is raised if geom
has fewer than three points or vertices, or consists of multiple points all in a straight line.
With geodetic data, this function is supported by approximations, as explained in Functions Supported by Approximations with Geodetic Data.
Examples
The following example returns a geometry object that is the concave hull of cola_c
. (The example uses the definitions and data from Simple Example: Inserting_ Indexing_ and Querying Spatial Data.
-- Return the concave hull of a polygon. SELECT c.name, SDO_GEOM.SDO_CONCAVEHULL(c.shape, 0.005) FROM cola_markets c WHERE c.name = 'cola_c'; NAME -------------------------------- SDO_GEOM.SDO_CONCAVEHULL(C.SHAPE,0.005)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), -------------------------------------------------------------------------------- cola_c SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARR AY(6, 3, 6, 5, 4, 5, 3, 3, 6, 3))