26 SDO_LRS Package (Linear Referencing System)

The MDSYS.SDO_LRS package contains subprograms that create, modify, query, and convert linear referencing elements.

These subprograms do not change the state of the database. Most LRS subprograms are functions.

To use the subprograms in this chapter, you must understand the linear referencing system (LRS) concepts and techniques described in Linear Referencing System.

Note:

The SDO_LRS subprograms for three-dimensional geometries are supported only if Oracle JVM is enabled on your Oracle Autonomous Database Serverless deployments. To enable Oracle JVM, see Use Oracle Java in Using Oracle Autonomous Database Serverless for more information.

Table 26-1 lists subprograms related to creating and editing geometric segments.

Table 26-1 Subprograms for Creating and Editing Geometric Segments

Subprogram Description

SDO_LRS.DEFINE_GEOM_SEGMENT

Defines a geometric segment.

SDO_LRS.REDEFINE_GEOM_SEGMENT

Populates the measures of all shape points of a geometric segment based on the start and end measures, overriding any previously assigned measures between the start point and end point.

SDO_LRS.CLIP_GEOM_SEGMENT

Clips a geometric segment (synonym of SDO_LRS.DYNAMIC_SEGMENT).

SDO_LRS.DYNAMIC_SEGMENT

Clips a geometric segment (synonym of SDO_LRS.CLIP_GEOM_SEGMENT).

SDO_LRS.CONCATENATE_GEOM_SEGMENTS

Concatenates two geometric segments into one segment.

SDO_LRS.LRS_INTERSECTION

Returns an LRS geometry object that is the topological intersection (AND operation) of two geometry objects where one or both are LRS geometries.

SDO_LRS.OFFSET_GEOM_SEGMENT

Returns the geometric segment at a specified offset from a geometric segment.

SDO_LRS.SPLIT_GEOM_SEGMENT

Splits a geometric segment into two segments.

SDO_LRS.RESET_MEASURE

Sets all measures of a geometric segment, including the start and end measures, to null values, overriding any previously assigned measures.

SDO_LRS.SCALE_GEOM_SEGMENT

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

SDO_LRS.SET_PT_MEASURE

Sets the measure value of a specified point.

SDO_LRS.REVERSE_MEASURE

Returns a new geometric segment by reversing the measure values, but not the direction, of the original geometric segment.

SDO_LRS.TRANSLATE_MEASURE

Returns a new geometric segment by translating the original geometric segment (that is, shifting the start and end measures by a specified value).

SDO_LRS.REVERSE_GEOMETRY

Returns a new geometric segment by reversing the measure values and the direction of the original geometric segment.

Table 26-2 lists subprograms related to querying geometric segments.

Table 26-2 Subprograms for Querying and Validating Geometric Segments

Subprogram Description

SDO_LRS.VALID_GEOM_SEGMENT

Checks if a geometric segment is valid.

SDO_LRS.VALID_LRS_PT

Checks if an LRS point is valid.

SDO_LRS.VALID_MEASURE

Checks if a measure falls within the measure range of a geometric segment.

SDO_LRS.CONNECTED_GEOM_SEGMENTS

Checks if two geometric segments are spatially connected.

SDO_LRS.GEOM_SEGMENT_LENGTH

Returns the length of a geometric segment.

SDO_LRS.GEOM_SEGMENT_START_PT

Returns the start point of a geometric segment.

SDO_LRS.GEOM_SEGMENT_END_PT

Returns the end point of a geometric segment.

SDO_LRS.GEOM_SEGMENT_START_MEASURE

Returns the start measure of a geometric segment.

SDO_LRS.GEOM_SEGMENT_END_MEASURE

Returns the end measure of a geometric segment.

SDO_LRS.GET_MEASURE

Returns the measure of an LRS point.

SDO_LRS.GET_NEXT_SHAPE_PT

Returns the next shape point on a geometric segment after a specified measure value or LRS point.

SDO_LRS.GET_NEXT_SHAPE_PT_MEASURE

Returns the measure value of the next shape point on a geometric segment after a specified measure value or LRS point.

SDO_LRS.GET_PREV_SHAPE_PT

Returns the previous shape point on a geometric segment before a specified measure value or LRS point.

SDO_LRS.GET_PREV_SHAPE_PT_MEASURE

Returns the measure value of the previous shape point on a geometric segment before a specified measure value or LRS point.

SDO_LRS.IS_GEOM_SEGMENT_DEFINED

Checks if an LRS segment is defined correctly.

SDO_LRS.IS_MEASURE_DECREASING

Checks if the measure values along an LRS segment are decreasing (that is, descending in numerical value).

SDO_LRS.IS_MEASURE_INCREASING

Checks if the measure values along an LRS segment are increasing (that is, ascending in numerical value).

SDO_LRS.IS_SHAPE_PT_MEASURE

Checks if a specified measure value is associated with a shape point on a geometric segment.

SDO_LRS.MEASURE_RANGE

Returns the measure range of a geometric segment, that is, the difference between the start measure and end measure.

SDO_LRS.MEASURE_TO_PERCENTAGE

Returns the percentage (0 to 100) that a specified measure is of the measure range of a geometric segment.

SDO_LRS.PERCENTAGE_TO_MEASURE

Returns the measure value of a specified percentage (0 to 100) of the measure range of a geometric segment.

SDO_LRS.LOCATE_PT

Returns the point located at a specified distance from the start of a geometric segment.

SDO_LRS.PROJECT_PT

Returns the projection point of a specified point. The projection point is on the geometric segment.

SDO_LRS.FIND_LRS_DIM_POS

Returns the position of the measure dimension within the SDO_DIM_ARRAY structure for a specified SDO_GEOMETRY column.

SDO_LRS.FIND_MEASURE

Returns the measure of the closest point on a segment to a specified projection point.

SDO_LRS.FIND_OFFSET

Returns the signed offset (shortest distance) from a point to a geometric segment.

SDO_LRS.VALIDATE_LRS_GEOMETRY

Checks if an LRS geometry is valid.

Table 26-3 lists subprograms related to converting geometric segments.

Table 26-3 Subprograms for Converting Geometric Segments

Subprogram Description

SDO_LRS.CONVERT_TO_LRS_DIM_ARRAY

Converts a standard dimensional array to an LRS dimensional array by creating a measure dimension.

SDO_LRS.CONVERT_TO_LRS_GEOM

Converts a standard SDO_GEOMETRY line string to an LRS geometric segment by adding measure information.

SDO_LRS.CONVERT_TO_LRS_LAYER

Converts all geometry objects in a column of type SDO_GEOMETRY from standard line string geometries without measure information to LRS geometric segments with measure information, and updates the metadata.

SDO_LRS.CONVERT_TO_STD_DIM_ARRAY

Converts an LRS dimensional array to a standard dimensional array by removing the measure dimension.

SDO_LRS.CONVERT_TO_STD_GEOM

Converts an LRS geometric segment to a standard SDO_GEOMETRY line string by removing measure information.

SDO_LRS.CONVERT_TO_STD_LAYER

Converts all geometry objects in a column of type SDO_GEOMETRY from LRS geometric segments with measure information to standard line string geometries without measure information, and updates the metadata.

For more information about conversion subprograms, see Converting LRS Geometries.

The rest of this chapter provides reference information on the subprograms, listed in alphabetical order.