26.30 SDO_LRS.LRS_INTERSECTION
Format
SDO_LRS.LRS_INTERSECTION( geom_1 IN SDO_GEOMETRY, dim_array_1 IN SDO_DIM_ARRAY, geom_2 IN SDO_GEOMETRY, dim_array_2 IN SDO_DIM_ARRAY ) RETURN SDO_GEOMETRY;
or
SDO_LRS.LRS_INTERSECTION( geom_1 IN SDO_GEOMETRY, geom_2 IN SDO_GEOMETRY, tolerance IN NUMBER ) RETURN SDO_GEOMETRY;
Description
Returns an LRS geometry object that is the topological intersection (AND operation) of two geometry objects where one or both are LRS geometries.
Parameters
- geom_1
-
Geometry object.
- dim_array_1
-
Dimensional information array corresponding to
geom_1
, usually selected from one of the xxx_SDO_GEOM_METADATA views (described in Geometry Metadata Views). - geom_2
-
Geometry object.
- dim_array_2
-
Dimensional information array corresponding to
geom_2
, usually selected from one of the xxx_SDO_GEOM_METADATA views (described in Geometry Metadata Views). - tolerance
-
Tolerance value (see Tolerance).
Usage Notes
This function performs essentially the same intersection operation as the SDO_GEOM.SDO_INTERSECTION function (described in SDO_GEOM Package (Geometry)), except that SDO_LRS.LRS_INTERSECTION is designed to return a valid LRS geometry (point, line string, or multiline string) where one or both of the geometry-related input parameters are LRS geometries. (If neither input geometry is an LRS geometry, this function operates the same as the SDO_GEOM.SDO_INTERSECTION function.).
The returned geometry is an LRS line string, multiline string, or point geometry that includes measure dimension information. The measure values reflect those in the first LRS geometry specified as an input parameter.
The first LRS geometry specified as an input parameter must not be a polygon; it must be a line string, multiline string, or point.
If an LRS line string (geometric segment) intersects a line string (LRS or standard), the result is an LRS point; if an LRS line string intersects a polygon, the result is an LRS line string.
An exception is raised if geom_1
and geom_2
are based on different coordinate systems.
Examples
The following example shows an LRS geometric segment (illustrated in Figure 7-20 in Example of LRS Functions) intersected by a vertical line from (8,2) to (8,6). The result is an LRS point geometry, in which the measure value (8) reflects the measure for that point (designated as Exit 3 in Figure 7-20) in the geom_1
geometry. (This example uses the definitions from the example in Example of LRS Functions.)
-- Intersection of LRS segment and standard line segment SELECT SDO_LRS.LRS_INTERSECTION(route_geometry, SDO_GEOMETRY(2002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(8,2, 8,6)), 0.005) FROM lrs_routes WHERE route_id = 1; SDO_LRS.LRS_INTERSECTION(ROUTE_GEOMETRY,SDO_GEOMETRY(2002,NULL,NULL,SDO_ELEM_INF -------------------------------------------------------------------------------- SDO_GEOMETRY(3301, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), SDO_ORDINATE_ARRAY( 8, 4, 8))
The following example shows an LRS geometric segment (illustrated in Figure 7-20 in Example of LRS Functions) intersected by a vertical line from (12,2) to (12,6). The result is an LRS line string geometry, in which the measure values (12 and 14) reflect measures for points (the first of which is designated as Exit 4 in Figure 7-20) in the geom_1
geometry. (This example uses the definitions from the example in Example of LRS Functions.)
SELECT SDO_LRS.LRS_INTERSECTION(route_geometry, SDO_GEOMETRY(2002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(12,2, 12,6)), 0.005) FROM lrs_routes WHERE route_id = 1; SDO_LRS.LRS_INTERSECTION(ROUTE_GEOMETRY,SDO_GEOMETRY(2002,NULL,NULL,SDO_ELEM_INF -------------------------------------------------------------------------------- SDO_GEOMETRY(3302, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY( 12, 4, 12, 12, 6, 14))
Parent topic: SDO_LRS Package (Linear Referencing System)