25.22 SDO_GEOM.SDO_MBC_RADIUS

Note:

This feature is available starting with Oracle Database 12c Release 1 (12.1.0.2).

Format

SDO_GEOM.SDO_MBC_RADIUS(     
  geom  IN SDO_GEOMETRY,      
  dim   IN SDO_DIM_ARRAY,      
  unit  IN VARCHAR2 DEFAULT NULL      
) RETURN NUMBER;

or

SDO_GEOM.SDO_MBC_RADIUS(     
  geom  IN SDO_GEOMETRY,      
  tol   IN NUMBER,      
  unit  IN VARCHAR2 DEFAULT NULL      
) RETURN NUMBER;

Description

Returns the length of the radius of the minimum bounding circle (MBC) of a geometry object.

Parameters

geom

Geometry object.

dim

Dimensional information array corresponding to geom, usually selected from one of the xxx_SDO_GEOM_METADATA views (described in Geometry Metadata Views).

tol

Tolerance value (see Tolerance).

unit

Unit of measurement: a quoted string with unit= and an SDO_UNIT value from the MDSYS.SDO_DIST_UNITS table (for example, 'unit=KM'). See Unit of Measurement Support for more information about unit of measurement specification.

If this parameter is not specified, the unit of measurement associated with the data is assumed. For geodetic data, the default unit of measurement is meters.

Usage Notes

The minimum bounding circle is the circle that minimally encloses the geometry.

If the geometry (geom) contains any arc elements, the function calculates the minimum bounding rectangle (MBR) for each arc element and uses these MBRs in calculating the minimum bounding circle of the geometry. Thus, for example, if the input geometry is a circle, the length of the radius of the computed MBC will be greater than that of the input geometry.

Examples

The following example returns the length of the radius of the minimum bounding circle of cola_a. (The example uses the definitions and data from Simple Example: Inserting_ Indexing_ and Querying Spatial Data.)

-- Return the MBC radius of cola_a.
SELECT c.name, SDO_GEOM.SDO_MBC_RADIUS(c.shape, 0.005) FROM cola_markets c
  WHERE c.name = 'cola_a';
 
NAME                             SDO_GEOM.SDO_MBC_RADIUS(C.SHAPE,0.005)         
-------------------------------- --------------------------------------         
cola_a                                                       3.60555128