26.23 SDO_LRS.GET_PREV_SHAPE_PT
Format
SDO_LRS.GET_PREV_SHAPE_PT( geom_segment IN SDO_GEOMETRY, measure IN NUMBER ) RETURN SDO_GEOMETRY;
or
SDO_LRS.GET_PREV_SHAPE_PT( geom_segment IN SDO_GEOMETRY, dim_array IN SDO_DIM_ARRAY, measure IN NUMBER ) RETURN SDO_GEOMETRY;
or
SDO_LRS.GET_PREV_SHAPE_PT( geom_segment IN SDO_GEOMETRY, point IN SDO_GEOMETRY ) RETURN SDO_GEOMETRY;
or
SDO_LRS.GET_PREV_SHAPE_PT( geom_segment IN SDO_GEOMETRY, dim_array IN SDO_DIM_ARRAY, point IN SDO_GEOMETRY ) RETURN SDO_GEOMETRY;
Description
Returns the previous shape point on a geometric segment before a specified measure value or LRS point.
Parameters
- geom_segment
-
Geometric segment (LRS segment) containing measure information.
- measure
-
Measure value on the geometric segment for which to return the previous shape point.
- point
-
Point for which to return the previous shape point. If
point
is not ongeom_segment
, the point on the geometric segment closest to the specified point is computed, and the closest shape point before that point is returned. - 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).
Usage Notes
If measure
or point
identifies the start point of the geometric segment, a null value is returned.
An exception is raised if measure
is not a valid value for geom_segment
or if point
is not a valid LRS point.
Contrast this function with SDO_LRS.GET_NEXT_SHAPE_PT, which returns the next shape point on a geometric segment after a specified measure value or LRS point.
The _3D format of this function (SDO_LRS.GET_PREV_SHAPE_PT_3D) is available. For information about _3D formats of LRS functions, see 3D Formats of LRS Functions.
Examples
The following example returns the closest shape point to measure 14 and before measure 14 on the geometric segment representing Route 1. (This example uses the definitions from the example in Example of LRS Functions.)
SELECT SDO_LRS.GET_PREV_SHAPE_PT(a.route_geometry, 14) FROM lrs_routes a WHERE a.route_id = 1; SDO_LRS.GET_PREV_SHAPE_PT(A.ROUTE_GEOMETRY,14)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, -------------------------------------------------------------------------------- SDO_GEOMETRY(3301, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), SDO_ORDINATE_ARRAY( 12, 4, 12))
Parent topic: SDO_LRS Package (Linear Referencing System)