26.41 SDO_LRS.SET_PT_MEASURE

Format

SDO_LRS.SET_PT_MEASURE(
     geom_segment IN OUT SDO_GEOMETRY, 
     point        IN SDO_GEOMETRY, 
     measure      IN NUMBER) RETURN VARCHAR2;

or

SDO_LRS.SET_PT_MEASURE(
     geom_segment IN OUT SDO_GEOMETRY, 
     dim_array    IN SDO_DIM_ARRAY, 
     point        IN SDO_GEOMETRY, 
     pt_dim_array IN SDO_DIM_ARRAY, 
     measure      IN NUMBER) RETURN VARCHAR2;

or

SDO_LRS.SET_PT_MEASURE(
     point   IN OUT SDO_GEOMETRY, 
     measure IN NUMBER) RETURN VARCHAR2;

or

SDO_LRS.SET_PT_MEASURE(
     point     IN OUT SDO_GEOMETRY, 
     dim_array IN SDO_DIM_ARRAY, 
     measure   IN NUMBER) RETURN VARCHAR2;

Description

Sets the measure value of a specified point.

Parameters

geom_segment

Geometric segment (LRS segment containing measure information) that contains the point.

dim_array

Dimensional information array corresponding to geom_segment (in the second format) or point (in the fourth format), usually selected from one of the xxx_SDO_GEOM_METADATA views (described in Geometry Metadata Views).

point

Point for which the measure value is to be set.

pt_dim_array

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

measure

Measure value to be assigned to the specified point.

Usage Notes

The function returns TRUE if the measure value was successfully set, and FALSE if the measure value was not set.

If both geom_segment and point are specified, the behavior of the procedure depends on whether or not point is a shape point on geom_segment:

  • If point is a shape point on geom_segment, the measure value of point is set.

  • If point is not a shape point on geom_segment, the shape point on geom_segment that is nearest to point is found, and the measure value of that shape point is set.

The _3D format of this function (SDO_LRS.SET_PT_MEASURE_3D) is available; however, only the formats that include the geom_segment parameter are available for SDO_LRS.SET_PT_MEASURE_3D. For information about _3D formats of LRS functions, see 3D Formats of LRS Functions.

An exception is raised if geom_segment or point is invalid.

Examples

The following example sets the measure value of point (8,10) to 20. (This example uses the definitions from the example in Example of LRS Functions.)

-- Set the measure value of point 8,10 to 20 (originally 22).
DECLARE
geom_segment SDO_GEOMETRY;
dim_array SDO_DIM_ARRAY;
result VARCHAR2(32);

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';

-- Set the measure value of point 8,10 to 20 (originally 22).
result := SDO_LRS.SET_PT_MEASURE (geom_segment, 
  SDO_GEOMETRY(3301, NULL, NULL, 
     SDO_ELEM_INFO_ARRAY(1, 1, 1), 
     SDO_ORDINATE_ARRAY(8, 10, 22)),
  20);

-- Display the result.
DBMS_OUTPUT.PUT_LINE('Returned value = ' || result);

END;
/
Returned value = TRUE

PL/SQL procedure successfully completed.