24.44 SDO_LRS.VALID_GEOM_SEGMENT

Format

SDO_LRS.VALID_GEOM_SEGMENT(
     geom_segment IN SDO_GEOMETRY 
     [, dim_array IN SDO_DIM_ARRAY] 
     ) RETURN VARCHAR2;

Description

Checks if a geometry object is a valid geometric segment.

Parameters

geom_segment

Geometric segment to be checked for validity.

dim_array

Dimensional information array corresponding to geom_segment, usually selected from one of the xxx_SDO_GEOM_METADATA views (described in Geometry Metadata Views).

Usage Notes

This function returns TRUE if geom_segment is valid and FALSE if geom_segment is not valid.

Measure information is assumed to be stored in the last element of the SDO_DIM_ARRAY in the Oracle Spatial and Graph metadata.

This function only checks for geometry type and number of dimensions of the geometric segment. To further validate measure information, use the SDO_LRS.IS_GEOM_SEGMENT_DEFINED function.

The _3D format of this function (SDO_LRS.VALID_GEOM_SEGMENT_3D) is available. For information about _3D formats of LRS functions, see 3D Formats of LRS Functions.

Examples

The following example checks if the geometric segment representing Route 1 is valid. (This example uses the definitions from the example in Example of LRS Functions.)

SELECT  SDO_LRS.VALID_GEOM_SEGMENT(route_geometry)
  FROM lrs_routes WHERE route_id = 1;

SDO_LRS.VALID_GEOM_SEGMENT(ROUTE_GEOMETRY)                                      
--------------------------------------------------------------------------------
TRUE