26.5 SDO_LRS.CONVERT_TO_LRS_GEOM
Format
SDO_LRS.CONVERT_TO_LRS_GEOM( standard_geom IN SDO_GEOMETRY [, start_measure IN NUMBER, end_measure IN NUMBER] ) RETURN SDO_GEOMETRY; or SDO_LRS.CONVERT_TO_LRS_GEOM( standard_geom IN SDO_GEOMETRY, dim_array IN SDO_DIM_ARRAY [, start_measure IN NUMBER, end_measure IN NUMBER] ) RETURN SDO_GEOMETRY; or SDO_LRS.CONVERT_TO_LRS_GEOM( standard_geom IN SDO_GEOMETRY, m_pos IN INTEGER [, start_measure IN NUMBER, end_measure IN NUMBER] ) RETURN SDO_GEOMETRY;
Description
Converts a standard SDO_GEOMETRY line string to an LRS geometric segment by adding measure information.
Parameters
- standard_geom
-
Line string geometry that does not contain measure information.
- dim_array
-
Dimensional information array corresponding to
standard_geom
, usually selected from one of the xxx_SDO_GEOM_METADATA views (described in Geometry Metadata Views). - m_pos
-
Position of the measure dimension. If specified, must be 3 or 4. By default, the measure dimension is the last dimension in the SDO_DIM_ARRAY.
- start_measure
-
Distance measured from the start point of a geometric segment to the start point of the linear feature. The default is 0.
- end_measure
-
Distance measured from the end point of a geometric segment to the start point of the linear feature. The default is the cartographic length (for example, 75 if the cartographic length is 75 and the unit of measure is miles).
Usage Notes
This function returns an LRS geometric segment with measure information, with measure information provided for all shape points.
An exception is raised if standard_geom
has an invalid geometry type or dimensionality, if m_pos
is less than 3 or greater than 4, or if start_measure
or end_measure
is out of range.
The _3D format of this function (SDO_LRS.CONVERT_TO_LRS_GEOM_3D) is available; however, the m_pos
parameter is not available for SDO_LRS.CONVERT_TO_LRS_GEOM_3D. For information about _3D formats of LRS functions, see 3D Formats of LRS Functions.
For more information about conversion functions, see Converting LRS Geometries.
Examples
The following example converts the geometric segment representing Route 1 to LRS format. (This example uses the definitions from the example in Example of LRS Functions.)
SELECT SDO_LRS.CONVERT_TO_LRS_GEOM(a.route_geometry, m.diminfo) 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.CONVERT_TO_LRS_GEOM(A.ROUTE_GEOMETRY,M.DIMINFO)(SDO_GTYPE, SDO_SRID, SDO -------------------------------------------------------------------------------- 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, NULL, 8, 10, 22, 5, 14, 27))
Parent topic: SDO_LRS Package (Linear Referencing System)