26.3 SDO_LRS.CONNECTED_GEOM_SEGMENTS

Format

SDO_LRS.CONNECTED_GEOM_SEGMENTS(
     geom_segment_1  IN SDO_GEOMETRY, 
     geom_segment_2  IN SDO_GEOMETRY, 
     tolerance       IN NUMBER DEFAULT 1.0e-8 
     ) RETURN VARCHAR2;

or

SDO_LRS.CONNECTED_GEOM_SEGMENTS(
     geom_segment_1  IN SDO_GEOMETRY, 
     dim_array_1     IN SDO_DIM_ARRAY, 
     geom_segment_2  IN SDO_GEOMETRY, 
     dim_array_2     IN SDO_DIM_ARRAY 
     ) RETURN VARCHAR2;

Description

Checks if two geometric segments are spatially connected.

Parameters

geom_segment_1

First of two geometric segments (LRS segments containing measure information) to be checked.

dim_array_1

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

geom_segment_2

Second of two geometric segments (LRS segments containing measure information) to be checked.

dim_array_2

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

tolerance

Tolerance value (see Tolerance and Tolerance Values with LRS Functions). The default value is 0.00000001.

Usage Notes

This function returns TRUE if the geometric segments are spatially connected and FALSE if the geometric segments are not spatially connected.

An exception is raised if geom_segment_1 or geom_segment_2 has an invalid geometry type or dimensionality, or if geom_segment_1 and geom_segment_2 are based on different coordinate systems.

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

Examples

The following example checks if two geometric segments (results of a previous split operation) are spatially connected.

-- Are result_geom_1 and result_geom2 connected? 
SELECT  SDO_LRS.CONNECTED_GEOM_SEGMENTS(a.route_geometry,
           b.route_geometry, 0.005)
  FROM lrs_routes a, lrs_routes b
  WHERE a.route_id = 11 AND b.route_id = 12;

SDO_LRS.CONNECTED_GEOM_SEGMENTS(A.ROUTE_GEOMETRY,B.ROUTE_GEOMETRY,0.005)        
--------------------------------------------------------------------------------
TRUE