25.20 SDO_GEOM.SDO_MBC

Note:

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

Format

SDO_GEOM.SDO_MBC(     
  geom          IN SDO_GEOMETRY,      
  dim           IN SDO_DIM_ARRAY,      
  arc_tolerance IN NUMBER DEFAULT NULL      
) RETURN SDO_GEOMETRY;

or

SDO_GEOM.SDO_MBC(     
  geom          IN SDO_GEOMETRY,      
  tol           IN NUMBER,      
  arc_tolerance IN NUMBER DEFAULT NULL      
) RETURN SDO_GEOMETRY;

Description

Returns a circle object that represents 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).

arc_tolerance

Arc tolerance value (see the explanation of the arc_tolerance keyword in the Usage Notes for SDO_GEOM.SDO_ARC_DENSIFY). This parameter is mainly used for densifying geodetic arcs.

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 computed MBC will be larger than the input geometry.

Examples

The following example returns a geometry object that is 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 of cola_a.
SELECT c.name, SDO_GEOM.SDO_MBC(c.shape, 0.005) FROM cola_markets c
  WHERE c.name = 'cola_a';
 
NAME                                                                            
--------------------------------                                                
SDO_GEOM.SDO_MBC(C.SHAPE,0.005)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELE
--------------------------------------------------------------------------------
cola_a                                                                          
SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 4), SDO_ORDINATE_ARR
AY(3, .394448725, 6.60555128, 4, 3, 7.60555128))