10.12.2012 Views

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

Oracle Spatial User's Guide and Reference - InfoLab

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Usage Notes<br />

Examples<br />

SDO_LRS.TRANSLATE_MEASURE<br />

This function adds translate_m to the start <strong>and</strong> end measures of geom_segment.<br />

For example, if geom_segment has a start measure of 50 <strong>and</strong> an end measure of<br />

100, <strong>and</strong> if translate_m is 10, the returned geometric segment has a start measure<br />

of 60 <strong>and</strong> an end measure of 110, as shown in Figure 16–1.<br />

Figure 16–1 Translating a Geometric Segment<br />

M = 50 M = 100 M = 60 M = 110<br />

Translate (10)<br />

An exception is raised if geom_segment has an invalid geometry type or<br />

dimensionality.<br />

The _3D format of this function (SDO_LRS.TRANSLATE_MEASURE_3D) is<br />

available. For information about _3D formats of LRS functions, see Section 7.4.<br />

The following example translates (shifts) by 10 the geometric segment representing<br />

Route 1. (This example uses the definitions from the example in Section 7.7.)<br />

SELECT SDO_LRS.TRANSLATE_MEASURE(a.route_geometry, m.diminfo, 10)<br />

FROM lrs_routes a, user_sdo_geom_metadata m<br />

WHERE m.table_name = 'LRS_ROUTES' AND m.column_name = 'ROUTE_GEOMETRY'<br />

AND a.route_id = 1;<br />

SDO_LRS.TRANSLATE_MEASURE(A.ROUTE_GEOMETRY,M.DIMINFO,10)(SDO_GTYPE, SDO_SRID, SD<br />

--------------------------------------------------------------------------------<br />

SDO_GEOMETRY(3002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(<br />

2, 2, 10, 2, 4, 12, 8, 4, 18, 12, 4, 22, 12, 10, 28, 8, 10, 32, 5, 14, 37))<br />

Linear Referencing Subprograms 16-103

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!