Skip Headers

Oracle® Spatial User's Guide and Reference
10g Release 1 (10.1)

Part Number B10826-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

11 SDO_GEOMETRY Object Type Methods

This chapter contains reference and usage information for the SDO_GEOMETRY object type methods.

The SDO_GEOMETRY object type is described in Section 2.2. The type methods are listed in Table 11-1.

Table 11-1 SDO_GEOMETRY Type Methods

Method Description
GET_DIMS
Returns the number of dimensions of a geometry object.
GET_GTYPE
Returns the geometry type of a geometry object.
GET_LRS_DIM
Returns the measure dimension of an LRS geometry object.


GET_DIMS

Format

GET_DIMS( ) RETURN NUMBER;

Description

Returns the number of dimensions of a geometry object, as specified in its SDO_GTYPE value.

Parameters

None.

Usage Notes

The SDO_TYPE value is 4 digits in the format dltt, as described in Section 2.2.1. This method returns the d (dimensionality) value, that is, the number of dimensions.

Examples

The following example returns the number of dimensions of the cola_d geometry object. (The example uses the definitions and data from Section 2.1.)

SELECT c.mkt_id, c.shape.GET_DIMS() 
  FROM cola_markets c WHERE c.name = 'cola_d';

    MKT_ID C.SHAPE.GET_DIMS()
---------- ------------------
         4                  2

GET_GTYPE

Format

GET_GTYPE( ) RETURN NUMBER;

Description

Returns the geometry type of a geometry object, as specified in its SDO_GTYPE value.

Parameters

None.

Usage Notes

The SDO_TYPE value is 4 digits in the format dltt, as described in Section 2.2.1. This method returns the tt value, that is, the geometry type.

Examples

The following example returns the geometry type of each geometry object in the COLA_MARKETS table. (The example uses the definitions and data from Section 2.1.)

SELECT c.mkt_id, c.shape.GET_GTYPE() FROM cola_markets c;

    MKT_ID C.SHAPE.GET_GTYPE()
---------- -------------------
         1                   3
         2                   3
         3                   3
         4                   3

GET_LRS_DIM

Format

GET_LRS_DIM( ) RETURN NUMBER;

Description

Returns the measure dimension of an LRS geometry object, as specified in its SDO_GTYPE value.

Parameters

None.

Usage Notes

The SDO_TYPE value is 4 digits in the format dltt, as described in Section 2.2.1. This method returns the l value.

The l value is meaningful only for LRS geometry objects, and must be 0, 3, or 4:

Examples

The following example returns the measure dimension of the Route 1 geometry object. (This example uses the definitions from the example in Section 7.7.)

SELECT a.route_id, a.route_geometry.GET_LRS_DIM() 
    FROM lrs_routes a WHERE  a.route_id = 1;

  ROUTE_ID A.ROUTE_GEOMETRY.GET_LRS_DIM()                                       
---------- ------------------------------                                       
         1                              3