20.7 SDO_GEOM_MBR
SDO_GEOM_MBR(geometry);
Description
SDO_GEOM_MBR is a SQL operator that determines the minimum bounding rectangle of a geometry object.
Though it is functionally identical to the SDO_GEOM.SDO_MBR function, it provides better performance.
Keywords and Parameters
Value | Description |
---|---|
geometry |
Specifies a geometry column in a table. A spatial index on this column is recommended. Data type is SDO_GEOMETRY. |
Returns
SDO_GEOM_MBR returns a single rectangle that minimally encloses the geometry.
Usage Notes
See the Usage Notes for the SDO_GEOM.SDO_MBR subprogram.
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. Since 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_MBR(c.shape) FROM cola_markets c WHERE c.name = 'cola_d'; SDO_GEOM_MBR(C.SHAPE)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SD -------------------------------------------------------------------------------- SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARR AY(6, 7, 10, 11))
Parent topic: Spatial Operators