26.17 SDO_LRS.GEOM_SEGMENT_LENGTH
Format
SDO_LRS.GEOM_SEGMENT_LENGTH( geom_segment IN SDO_GEOMETRY [, dim_array IN SDO_DIM_ARRAY] ) RETURN NUMBER;
Description
Returns the length of 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).
Usage Notes
This function returns the length of geom_segment
. The length is the geometric length, which is not the same as the total of the measure unit values. To determine how long a segment is in terms of measure units, subtract the result of an SDO_LRS.GEOM_SEGMENT_START_MEASURE operation from the result of an SDO_LRS.GEOM_SEGMENT_END_MEASURE operation.
An exception is raised if geom_segment
has an invalid geometry type or dimensionality.
The _3D format of this function (SDO_LRS.GEOM_SEGMENT_LENGTH_3D) is available. For information about _3D formats of LRS functions, see 3D Formats of LRS Functions.
Examples
The following example returns the length of the geometric segment representing Route 1. (This example uses the definitions from the example in Example of LRS Functions.)
SELECT SDO_LRS.GEOM_SEGMENT_LENGTH(route_geometry) FROM lrs_routes WHERE route_id = 1; SDO_LRS.GEOM_SEGMENT_LENGTH(ROUTE_GEOMETRY) ------------------------------------------- 27
Parent topic: SDO_LRS Package (Linear Referencing System)