25.30 SDO_GEOM.SDO_WIDTH

Note:

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

Format

SDO_GEOM.SDO_WIDTH(     
  geom  IN SDO_GEOMETRY,      
  dim   IN SDO_DIM_ARRAY      
  [, unit IN VARCHAR2]      
) RETURN NUMBER;

or

SDO_GEOM.SDO_WIDTH(     
  geom  IN SDO_GEOMETRY,      
  tol   IN NUMBER       
  [, unit IN VARCHAR2]      
) RETURN NUMBER;

Description

Returns the width 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

For a convex polygon, the width is the minimum distance between parallel lines of support.

For a non-convex geometry, this function determines its convex geometry and returns the width of that convex geometry.

The input geometry can have no more than two dimensions.

If a point geometry is specified, the function returns 0 (zero).

Examples

The following example returns the width of all geometry objects stored in the COLA_MARKETS table. (The example uses the definitions and data from Simple Example: Inserting_ Indexing_ and Querying Spatial Data.)

SELECT name, SDO_GEOM.SDO_WIDTH(shape, 0.005) Width
  FROM cola_markets;
 
NAME                                  WIDTH                                     
-------------------------------- ----------                                     
cola_a                                    4                                     
cola_b                                    3                                     
cola_c                                    2                                     
cola_d                                    4