I am new to Oracle Spatial, my main objective is to conduct dynamic segmentation (DynSeg) on a selection of tables. I understand there is a rich Oracle Spatial API that has all kinds of functions and operators.

Has anyone successfully used any of the functions to implement dynamic segmentation?

  • Have you tried searching on linear referencing with Oracle Spatial?
    – PolyGeo
    Jun 2, 2017 at 21:00

2 Answers 2


Look at the Oracle documentation on Linear Referencing: the overall description is here. The functions are provided by a PL/SQL package called SDO_LRS.

The LRS system provides the fundamental operations: project a point on a line, locate a point on a line by its measure, dynamic segmentation. Also functions for splitting and joining LRS lines. And functions to generate LRS lines from regular geometries.

The LRS system operates on any coordinate system (geodetic or projected) and it works with 2D or 3D lines. Measures can be increasing or decreasing.



It's very important you become familiar with Oracle Spatial (SDO_geometry), then you can read the docs on SDO_LRS.

The SDO_LRS package works like the Linear Referencing System in ArcGIS. So the geometry you are working must have X,Y and M coordinates. I use SDO_GTYPE 3302 to work with routes polylines.

The function that you are looking for is SDO_LRS.CLIP_GEOM_SEGMENT, which is the same thing to SDO_LRS.DYNAMIC_SEGMENT. To use it is simple:

SELECT SDO_LRS.CLIP_GEOM_SEGMENT(route_geometry, 5, 10) FROM lrs_routes WHERE route_id = 1

Where route_geometry is the SDO_geometry from the table lrs_routes, 5 is the starting measure, and 10 is the end measure, and route_id is the id of the route that you are referring those measures. Make sure the measures you request are inside the measure range of the polyline you refer to (route_id). This could lead to some problems.

The result is another SDO_geometry object, with the segment that you want to display dynamically.

Querying the Dynamic segmentation is quite easy, but Oracle Spatial has a lot of details that you have to pay atention. For me, I faced some coordinates resolution problems, and performance issues, among other stuff. For sure, the kind of data you are working is different than mine, so the best way is trying!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.