Download Oracle Spatial User's Guide and Reference

Transcript
SDO_LRS.FIND_MEASURE
Usage Notes
This function returns the measure of the point on geom_segment that is closest to
the projection point. For example, if the projection point represents a shopping mall,
the function could be used to find how far from the start of the highway is the point
on the highway that is closest to the shopping mall.
An exception is raised if geom_segment 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.FIND_MEASURE_3D) is available. For
information about _3D formats of LRS functions, see Section 7.4.
Examples
The following example finds the measure for the point on the geometric segment
representing Route 1 that is closest to the point (10, 7). (This example uses the
definitions from the example in Section 7.7.)
-- Find measure for point on segment closest to 10,7.
-- Should return 15 (for point 12,7).
SELECT SDO_LRS.FIND_MEASURE(a.route_geometry, m.diminfo,
SDO_GEOMETRY(3001, NULL, NULL,
SDO_ELEM_INFO_ARRAY(1, 1, 1),
SDO_ORDINATE_ARRAY(10, 7, NULL)) )
FROM lrs_routes a, user_sdo_geom_metadata m
WHERE m.table_name = 'LRS_ROUTES' AND m.column_name = 'ROUTE_GEOMETRY'
AND a.route_id = 1;
SDO_LRS.FIND_MEASURE(A.ROUTE_GEOMETRY,M.DIMINFO,SDO_GEOMETRY(3001,NULL,NUL
-------------------------------------------------------------------------------15
Linear Referencing Subprograms
16-35