26.35 SDO_LRS.PROJECT_PT
Format
SDO_LRS.PROJECT_PT( geom_segment IN SDO_GEOMETRY, point IN SDO_GEOMETRY, tolerance IN NUMBER DEFAULT 1.0e-8 [, offset OUT NUMBER] ) RETURN SDO_GEOMETRY;
or
SDO_LRS.PROJECT_PT( geom_segment IN SDO_GEOMETRY, dim_array IN SDO_DIM_ARRAY, point IN SDO_GEOMETRY [, point_dim_array IN SDO_DIM_ARRAY] ) RETURN SDO_GEOMETRY;
or
SDO_LRS.PROJECT_PT( geom_segment IN SDO_GEOMETRY, dim_array IN SDO_DIM_ARRAY, point IN SDO_GEOMETRY, point_dim_array IN SDO_DIM_ARRAY [, offset OUT NUMBER] ) RETURN SDO_GEOMETRY;
Description
Returns the projection point of a specified point. The projection point is on the 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). - point
-
Point on
geom_segment
to be projected. - tolerance
-
Tolerance value (see Tolerance and Tolerance Values with LRS Functions). The default value is 0.00000001.
- point_dim_array
-
Dimensional information array corresponding to
point
, usually selected from one of the xxx_SDO_GEOM_METADATA views (described in Geometry Metadata Views). - offset
-
Offset (shortest distance) from the point to the geometric segment.
Usage Notes
This function returns the projection point (including its measure) of a specified point (point
). The projection point is on the geometric segment.
If multiple projection points exist, the first projection point encountered from the start point is returned.
If you specify the output parameter offset
, the function stores the signed offset (shortest distance) from the point to the geometric segment. For more information about the offset to a geometric segment, see Offset.
An exception is raised if geom_segment
or point
has an invalid geometry type or dimensionality, or if geom_segment
and point
are based on different coordinate systems.
The _3D format of this function (SDO_LRS.PROJECT_PT_3D) is available. For information about _3D formats of LRS functions, see 3D Formats of LRS Functions.
For more information about projecting a point onto a geometric segment, see Projecting a Point onto a Geometric Segment.
Examples
The following example returns the point (9,4,9) on the geometric segment representing Route 1 that is closest to the specified point (9,3,NULL). (This example uses the definitions from the example in Example of LRS Functions.)
-- Point 9,3,NULL is off the road; should return 9,4,9. SELECT SDO_LRS.PROJECT_PT(route_geometry, SDO_GEOMETRY(3301, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), SDO_ORDINATE_ARRAY(9, 3, NULL)) ) FROM lrs_routes WHERE route_id = 1; SDO_LRS.PROJECT_PT(ROUTE_GEOMETRY,SDO_GEOMETRY(3301,NULL,NULL,SDO_EL -------------------------------------------------------------------------------- SDO_GEOMETRY(3301, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), SDO_ORDINATE_ARRAY( 9, 4, 9))
Parent topic: SDO_LRS Package (Linear Referencing System)