Format
SDO_LRS.CONCATENATE_GEOM_SEGMENTS( geom_segment_1 IN SDO_GEOMETRY, geom_segment_2 IN SDO_GEOMETRY, tolerance IN NUMBER DEFAULT 1.0e-8 ) RETURN SDO_GEOMETRY;
or
SDO_LRS.CONCATENATE_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 SDO_GEOMETRY;
Description
Returns the geometry object resulting from the concatenation of two geometric segments.
Parameters
First geometric segment to be concatenated.
Dimensional information array corresponding to geom_segment_1
, usually selected from one of the xxx_SDO_GEOM_METADATA views (described in Geometry Metadata Views).
Second geometric segment to be concatenated.
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 value (see Tolerance and Tolerance Values with LRS Functions). The default value is 0.00000001.
Usage Notes
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 direction of the first geometric segment is preserved, and all measures of the second segment are shifted so that its start measure is the same as the end measure of the first segment.
The geometry type of geom_segment_1
and geom_segment_2
must be line or multiline. Neither can be a polygon.
The _3D format of this function (SDO_LRS.CONCATENATE_GEOM_SEGMENTS_3D) is available. For information about _3D formats of LRS functions, see 3D Formats of LRS Functions.
For more information about concatenating geometric segments, see Concatenating Geometric Segments.
Examples
The following example defines the geometric segment, splits it into two segments, then concatenates those segments. (This example uses the definitions from the example in Example of LRS Functions. The definitions of result_geom_1
, result_geom_2
, and result_geom_3
are displayed in Example 7-3.)
DECLARE geom_segment SDO_GEOMETRY; line_string SDO_GEOMETRY; dim_array SDO_DIM_ARRAY; result_geom_1 SDO_GEOMETRY; result_geom_2 SDO_GEOMETRY; result_geom_3 SDO_GEOMETRY; BEGIN SELECT a.route_geometry into geom_segment FROM lrs_routes a WHERE a.route_name = 'Route1'; SELECT m.diminfo into dim_array from user_sdo_geom_metadata m WHERE m.table_name = 'LRS_ROUTES' AND m.column_name = 'ROUTE_GEOMETRY'; -- Define the LRS segment for Route1. SDO_LRS.DEFINE_GEOM_SEGMENT (geom_segment, dim_array, 0, -- Zero starting measure: LRS segment starts at start of route. 27); -- End of LRS segment is at measure 27. SELECT a.route_geometry INTO line_string FROM lrs_routes a WHERE a.route_name = 'Route1'; -- Split Route1 into two segments. SDO_LRS.SPLIT_GEOM_SEGMENT(line_string,dim_array,5,result_geom_1,result_geom_2); -- Concatenate the segments that were just split. result_geom_3 := SDO_LRS.CONCATENATE_GEOM_SEGMENTS(result_geom_1, dim_array, result_geom_2, dim_array); -- Insert geometries into table, to display later. INSERT INTO lrs_routes VALUES( 11, 'result_geom_1', result_geom_1 ); INSERT INTO lrs_routes VALUES( 12, 'result_geom_2', result_geom_2 ); INSERT INTO lrs_routes VALUES( 13, 'result_geom_3', result_geom_3 ); END; /