26.40 SDO_LRS.SCALE_GEOM_SEGMENT

Format

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

or

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

Description

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

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.

shift_measure

Amount to be added to each measure value after the initial scaling. A value of 0 (zero) means that nothing is added (no shifting of measure values).

tolerance

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

Usage Notes

This function performs the following actions:

  1. It redistributes the measure values of the LRS geometric segment, using between start_measure for the start point and end_measure for the end point, and adjusting (scaling) the measure values in between accordingly.

  2. If shift_measure is not 0 (zero), it translates (shifts) each measure value computed in step 1 by adding the shift_measure value.

The action of this function is sometimes referred to as "stretching" the measure values. The function affects only the measure values; the other coordinates of the geometry are not changed.

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

The direction of the resulting geometric segment is preserved (that is, it reflects the original segment).

For more information about scaling geometric segments, see Scaling a Geometric Segment .

Examples

The following example scales the geometric segment representing Route 1, returning a segment in which the start measure is specified as100, the end measure is specified 200, with a shift measure value of 10. Consequently, after all measure values are scaled according to the start and end measure values, 10 is added to all measure values. Thus, for example, the start point measure is 110 and the end point measure is 210 in the returned geometry. (This example uses the definitions from the example in Example of LRS Functions.)

SQL> SELECT  SDO_LRS.SCALE_GEOM_SEGMENT(route_geometry, 100, 200, 10)
  FROM lrs_routes WHERE route_id = 1;
 
SDO_LRS.SCALE_GEOM_SEGMENT(ROUTE_GEOMETRY,100,200,10)(SDO_GTYPE, SDO_SRID, SDO_P
--------------------------------------------------------------------------------
SDO_GEOMETRY(3302, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(
2, 2, 110, 2, 4, 117.407407, 8, 4, 139.62963, 12, 4, 154.444444, 12, 10, 176.666
667, 8, 10, 191.481481, 5, 14, 210))