6.81 SDO_NET.GET_PERCENTAGE
Format
SDO_NET.GET_PERCENTAGE( network IN VARCHAR2, link_id IN NUMBER, pt_geom IN SDO_GEOMETRY ) RETURN SDO_GEOMETRY;
Description
Returns the percentage of the distance along a link's line string geometry of a point geometry.
Usage Notes
This function returns a value between 0 and 1. For example, if the point is 25 percent (one-fourth) of the distance between the start node and end node for the link, the function returns .25.
If pt_geom
is not on the link geometry, the nearest point on the link geometry to pt_geom
is used.
To find the point geometry that is a specified percentage of the distance along a link's line string geometry, use the SDO_NET.GET_PT function.
Examples
The following example returns the percentage (as a decimal fraction) of the distance of a specified point along the geometry associated with the link whose link ID is 101 in the network named ROADS_NETWORK
.
SQL> SELECT SDO_NET.GET_PERCENTAGE('ROADS_NETWORK', 101, SDO_GEOMETRY(2001, NULL, SDO_POINT_TYPE(2, 2.5, NULL), NULL, NULL)) FROM DUAL; 2 3 SDO_NET.GET_PERCENTAGE('ROADS_NETWORK',101,SDO_GEOMETRY(2001,NULL,SDO_POINT_TYPE -------------------------------------------------------------------------------- .25
Parent topic: SDO_NET Package Subprograms