26.1 SDO_LRS.CLIP_GEOM_SEGMENT

Format

SDO_LRS.CLIP_GEOM_SEGMENT(
     geom_segment  IN SDO_GEOMETRY, 
     start_measure IN NUMBER, 
     end_measure   IN NUMBER, 
     tolerance     IN NUMBER DEFAULT 1.0e-8 
     ) RETURN SDO_GEOMETRY;

or

SDO_LRS.CLIP_GEOM_SEGMENT(
     geom_segment  IN SDO_GEOMETRY, 
     dim_array     IN SDO_DIM_ARRAY, 
     start_measure IN NUMBER, 
     end_measure   IN NUMBER 
     ) RETURN SDO_GEOMETRY;

Description

Returns the geometry object resulting from a clip operation on a geometric segment.

Note:

SDO_LRS.CLIP_GEOM_SEGMENT and SDO_LRS.DYNAMIC_SEGMENT are synonyms: both functions have the same parameters, behavior, and return value.

Parameters

geom_segment

Geometric segment (LRS segment) containing measure information.

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).

start_measure

Start measure of the geometric segment.

end_measure

End measure of the geometric segment.

tolerance

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

Usage Notes

An exception is raised if geom_segment, start_measure, or end_measure is invalid.

start_measure and end_measure can be any points on the geometric segment. They do not have to be in any specific order. For example, start_measure and end_measure can be 5 and 10, respectively, or 10 and 5, respectively.

The direction and measures of the resulting geometric segment are preserved (that is, they reflect the original segment).

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

For more information about clipping geometric segments, see Clipping a Geometric Segment.

Examples

The following example clips the geometric segment representing Route 1, returning the segment from measures 5 through 10. This segment might represent a construction zone. (This example uses the definitions from the example in Example of LRS Functions.)

SELECT  SDO_LRS.CLIP_GEOM_SEGMENT(route_geometry, 5, 10)
  FROM lrs_routes WHERE route_id = 1;

SDO_LRS.CLIP_GEOM_SEGMENT(ROUTE_GEOMETRY,5,10)(SDO_GTYPE, SDO_SRID, SDO_POINT(X,
--------------------------------------------------------------------------------
SDO_GEOMETRY(3302, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(
5, 4, 5, 8, 4, 8, 10, 4, 10))