33.1 SDO_TUNE.AVERAGE_MBR
Format
SDO_TUNE.AVERAGE_MBR( table_name IN VARCHAR2, column_name IN VARCHAR2, width OUT NUMBER, height OUT NUMBER);
Description
Calculates the average minimum bounding rectangle (MBR) for geometries in a layer.
Parameters
Usage Notes
This procedure computes and stores the width and height of the average minimum bounding rectangle for all geometries in a spatial geometry table. It calculates the average MBR by keeping track of the maximum and minimum X and Y values for all geometries in a spatial geometry table.
Examples
The following example calculates the minimum bounding rectangle for the SHAPE column of the COLA_MARKETS table.
DECLARE table_name VARCHAR2(32) := 'COLA_MARKETS'; column_name VARCHAR2(32) := 'SHAPE'; width NUMBER; height NUMBER; BEGIN SDO_TUNE.AVERAGE_MBR( table_name, column_name, width, height); DBMS_OUTPUT.PUT_LINE('Width = ' || width); DBMS_OUTPUT.PUT_LINE('Height = ' || height); END; / Width = 3.5 Height = 4.5
Related Topics
SDO_AGGR_MBR spatial aggregate function (in Spatial Aggregate Functions)
Parent topic: SDO_TUNE Package (Tuning)