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


View PDF 
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 111.
Table 111 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. 
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
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
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:
0 indicates that the geometry is a prerelease 9.0.1 LRS geometry with measure as the default (last) dimension, or that the geometry is a release 9.0.1 standard geometry.
3 indicates that the third dimension contains the measure information.
4 indicates that the fourth dimension contains the measure information.
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