25.2 SDO_GEOM.SDO_ALPHA_SHAPE

Format

SDO_GEOM.SDO_ALPHA_SHAPE(     
  geom   IN SDO_GEOMETRY,      
  tol    IN NUMBER,      
  radius IN NUMBER DEFALT NULL,      
  flag   IN BINARY_INTEGER DEFAULT 0       
) RETURN SDO_GEOMETRY;

Description

Returns the alpha shape geometry of the input geometry, based on a specified radius value.

Parameters

geom

Geometry object.

tol

Tolerance value (see Tolerance).

radius

Radius to be used in calculating the alpha shape. If this parameter is null, the alpha shape is the convex hull of the input geometry.

flag

Determines whether isolated points and edges are included: 0 (the default) includes isolated points and edges, so that the alpha shape is returned; 1 does not include isolated points and edges, so that only the polygon portion of the alpha shape is returned.

Usage Notes

The alpha shape is a generalization of the convex hull. This function takes all coordinates from the input geometry, uses them to compute Delaunay triangulations and the alpha shape.

If you specify a value for the radius parameter, you may first want to call the SDO_GEOM.SDO_CONCAVEHULL function using the format with the radius output parameter.

An exception is raised if geom is of point type, has fewer than three points or vertices, or consists of multiple points all in a straight line, or if radius is less than 0.

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 alpha shape of cola_c, which is also the convex hull of cola_c because the default value for the radius parameter (null) is used. (This simplified example uses a polygon as the input geometry; this function is normally used with a large set of point data. The example uses the definitions and data from Simple Example: Inserting_ Indexing_ and Querying Spatial Data.)

SELECT c.name, SDO_GEOM.SDO_ALPHA_SHAPE(c.shape, 0.005)
  FROM cola_markets c WHERE c.name = 'cola_c';
 
SDO_GEOM.SDO_ALPHA_SHAPE(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(4, 5, 3, 3, 6, 3, 6, 5, 4, 5))