26.43 SDO_LRS.TRANSLATE_MEASURE

Format

SDO_LRS.TRANSLATE_MEASURE(
     geom_segment IN SDO_GEOMETRY, 
     translate_m  IN NUMBER 
     ) RETURN SDO_GEOMETRY;

or

SDO_LRS.TRANSLATE_MEASURE(
     geom_segment IN SDO_GEOMETRY, 
     dim_array    IN SDO_DIM_ARRAY, 
     translate_m  IN NUMBER 
     ) RETURN SDO_GEOMETRY;

Description

Returns a new geometric segment by translating the original geometric segment (that is, shifting the start and end measures by a specified 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).

translate_m

Distance measured from the start point of a geometric segment to the start point of the linear feature.

Usage Notes

This function adds translate_m to the start and end measures of geom_segment. For example, if geom_segment has a start measure of 50 and an end measure of 100, and if translate_m is 10, the returned geometric segment has a start measure of 60 and an end measure of 110, as shown in th following figure.

Figure 26-1 Translating a Geometric Segment

Description of Figure 26-1 follows
Description of "Figure 26-1 Translating a Geometric Segment"

An exception is raised if geom_segment has an invalid geometry type or dimensionality.

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

Examples

The following example translates (shifts) by 10 the geometric segment representing Route 1. (This example uses the definitions from the example in Example of LRS Functions.)

SELECT SDO_LRS.TRANSLATE_MEASURE(a.route_geometry, m.diminfo, 10)
  FROM lrs_routes a, user_sdo_geom_metadata m
  WHERE m.table_name = 'LRS_ROUTES' AND m.column_name = 'ROUTE_GEOMETRY'
    AND a.route_id = 1;

SDO_LRS.TRANSLATE_MEASURE(A.ROUTE_GEOMETRY,M.DIMINFO,10)(SDO_GTYPE, SDO_SRID, SD
--------------------------------------------------------------------------------
SDO_GEOMETRY(3302, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(
2, 2, 10, 2, 4, 12, 8, 4, 18, 12, 4, 22, 12, 10, 28, 8, 10, 32, 5, 14, 37))