25.9 SDO_GEOM.SDO_CONCAVEHULL
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;
or
SDO_GEOM.SDO_CONCAVEHULL( geom IN SDO_GEOMETRY_ARRAY, tol IN NUMBER ) RETURN SDO_GEOMETRY;
or
SDO_GEOM.SDO_CONCAVEHULL( geom IN SDO_GEOMETRY_ARRAY, tol IN NUMBER, radius OUT NUMBER ) RETURN SDO_GEOMETRY;
Description
Returns a polygon-type object that represents the concave hull of a geometry object or of an array of geometry objects.
Parameters
- geom
-
Geometry object (type SDO_GEOMETRY), or array of geometry objects (type SDO_GEOMETRY_ARRAY, which is defined as
VARRAY OF SDO_GEOMETRY
). - tol
-
Tolerance value (see Tolerance).
- radius
-
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))
The following example returns a geometry that is the concave hull of an array of three geometry objects.
SELECT sdo_geom.sdo_concavehull(SDO_GEOMETRY_ARRAY( SDO_GEOMETRY(2005, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 4), SDO_ORDINATE_ARRAY(6, 3, 6, 5, 4, 5, 3, 3)), SDO_GEOMETRY(2005, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 4), SDO_ORDINATE_ARRAY(16, 13, 16, 15, 14, 15, 13, 13)), SDO_GEOMETRY(2005, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 4), SDO_ORDINATE_ARRAY(26, 23, 26, 25, 24, 25, 23, 23))), 0.000005) FROM dual; SDO_GEOM.SDO_CONCAVEHULL(SDO_GEOMETRY_ARRAY(SDO_GEOMETRY(2005,NULL,NULL,SDO_ELEM -------------------------------------------------------------------------------- SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARR AY(6, 3, 6, 5, 16, 13, 16, 15, 26, 23, 26, 25, 24, 25, 23, 23, 14, 15, 13, 13, 4 , 5, 3, 3, 6, 3))
Parent topic: SDO_GEOM Package (Geometry)