25.23 SDO_GEOM.SDO_MBR
Format
SDO_GEOM.SDO_MBR( geom IN SDO_GEOMETRY [, dim IN SDO_DIM_ARRAY] ) RETURN SDO_GEOMETRY;
Description
Returns the minimum bounding rectangle of a geometry object, that is, a single rectangle that minimally encloses the geometry.
Note:
SDO_GEOM_MBR is a SQL operator that is functionally identical to this function, but provides better performance. See SDO_GEOM_MBR for more information.
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).
Usage Notes
This function does not return an MBR geometry if a proper MBR cannot be constructed. Specifically:
-
If the input geometry is null, the function returns a null geometry.
-
If the input geometry is a point, the function returns the point.
-
If the input geometry consists of points all on a straight line, the function returns a two-point line.
-
If the input geometry has three dimensions but all Z dimension values are the same, the function returns a three-dimensional line.
Examples
The following example returns the minimum bounding rectangle of the cola_d
geometry in the COLA_MARKETS table. (The example uses the definitions and data from Simple Example: Inserting_ Indexing_ and Querying Spatial Data. Because cola_d
is a circle, the minimum bounding rectangle in this case is a square.)
-- Return the minimum bounding rectangle of cola_d (a circle). SELECT SDO_GEOM.SDO_MBR(c.shape, m.diminfo) FROM cola_markets c, user_sdo_geom_metadata m WHERE m.table_name = 'COLA_MARKETS' AND m.column_name = 'SHAPE' AND c.name = 'cola_d'; SDO_GEOM.SDO_MBR(C.SHAPE,M.DIMINFO)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO -------------------------------------------------------------------------------- SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARR AY(6, 7, 10, 11))
Related Topics
Parent topic: SDO_GEOM Package (Geometry)