26.33 SDO_LRS.OFFSET_GEOM_SEGMENT
Format
SDO_LRS.OFFSET_GEOM_SEGMENT( geom_segment IN SDO_GEOMETRY, start_measure IN NUMBER, end_measure IN NUMBER, offset IN NUMBER, tolerance IN NUMBER DEFAULT 1.0e-8 [, unit IN VARCHAR2] ) RETURN SDO_GEOMETRY;
or
SDO_LRS.OFFSET_GEOM_SEGMENT( geom_segment IN SDO_GEOMETRY, dim_array IN SDO_DIM_ARRAY, start_measure IN NUMBER, end_measure IN NUMBER, offset IN NUMBER [, unit IN VARCHAR2] ) RETURN SDO_GEOMETRY;
Description
Returns the geometric segment at a specified offset from a 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). - start_measure
-
Start measure of
geom_segment
at which to start the offset operation. - end_measure
-
End measure of
geom_segment
at which to start the offset operation. - offset
-
Distance to measure perpendicularly from the points along
geom_segment
. Positive offset values are to the left ofgeom_segment
; negative offset values are to the right ofgeom_segment
. - tolerance
-
Tolerance value (see Tolerance and Tolerance Values with LRS Functions). The default value is 0.00000001.
- unit
-
Unit of measurement specification: a quoted string with one or both of the following keywords:
-
unit
and an SDO_UNIT value from the MDSYS.SDO_DIST_UNITS table. See Unit of Measurement Support for more information about unit of measurement specification. -
arc_tolerance
and an arc tolerance value. See the Usage Notes for the SDO_GEOM.SDO_ARC_DENSIFY function in SDO_GEOM Package (Geometry) for more information about thearc_tolerance
keyword.
For example: 'unit=km arc_tolerance=0.05'
If the input geometry is geodetic data, this parameter is required, and arc_tolerance
must be specified. If the input geometry is Cartesian or projected data, arc_tolerance
has no effect and should not be specified.
If this parameter is not specified for a Cartesian or projected geometry, or if the arc_tolerance
keyword is specified for a geodetic geometry but the unit
keyword is not specified, the unit of measurement associated with the data is assumed.
Usage Notes
start_measure
and end_measure
can be any points on the geometric segment. They do not have to be in any specific order. For example, start_measure
and end_measure
can be 5 and 10, respectively, or 10 and 5, respectively.
The direction and measures of the resulting geometric segment are preserved (that is, they reflect the original segment).
The geometry type of geom_segment
must be line or multiline. For example, it cannot be a polygon.
An exception is raised if geom_segment
, start_measure
, or end_measure
is invalid.
Examples
The following example returns the geometric segment 2 distance units to the left (positive offset 2) of the segment from measures 5 through 10 of Route 1. Note in SDO_ORDINATE_ARRAY of the returned segment that the Y values (6) are 2 greater than the Y values (4) of the relevant part of the original segment. (This example uses the definitions from the example in Example of LRS Functions.)
-- Create a segment offset 2 to the left from measures 5 through 10. -- First, display the original segment; then, offset. SELECT a.route_geometry FROM lrs_routes a WHERE a.route_id = 1; ROUTE_GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDIN -------------------------------------------------------------------------------- SDO_GEOMETRY(3302, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY( 2, 2, 0, 2, 4, 2, 8, 4, 8, 12, 4, 12, 12, 10, 18, 8, 10, 22, 5, 14, 27)) SELECT SDO_LRS.OFFSET_GEOM_SEGMENT(a.route_geometry, m.diminfo, 5, 10, 2) 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.OFFSET_GEOM_SEGMENT(A.ROUTE_GEOMETRY,M.DIMINFO,5,10,2)(SDO_GTYPE, SDO_SR -------------------------------------------------------------------------------- SDO_GEOMETRY(3302, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY( 5, 6, 5, 10, 6, 10))
Parent topic: SDO_LRS Package (Linear Referencing System)