Spatial Companion For Oracle – Linear Referencing System Legacy Edition, otherwise known as the LINEAR package, is a packaging of the original LRS functions (plus supporting packages) that provides a complete set of LRS functions.
These functions formed the basis of a complete re-write deployed via the new PLSQL Object Edition.
The functions are not guaranteed to be bug free and are not unit tested.
There are 59 functions which at $9.50 is 16 cents per function.
The functions available in the LINEAR package are:
Linear Referencing Functions (Copyrighted code)
ST_Split – A procedure that splits a line geometry at a known point
ST_Split_Geom_Segment – A procedure that splits a line geometry into possibly two line geometries at a known point
ST_Clip – A procedure that clips out a segment of a line geometry between two known points
ST_Snap – Snaps a point to Line
ST_Locate_Point – Returns the point (possibly offset) located at a specified measure from the start of a measured linestring.
ST_Find_Measure – Given a point near a measured linestring, this function returns the measure nearest to that point.
ST_Split_Points – Returns all intersection points that the splitter geometry has with the main geometry.
ST_Split_Line – Splits main linear geometry with a splitter geometry returning all the line segments formed from that splitting.
ST_Concat_Lines – A simple aggregator for linestrings where SDO_AGGR_CONCAT_LINES is not licensed.
ST_Concatenate_Geom_Segments – A method for concatenating two measured linestrings
ST_Is_Measure_Decreasing – Checks if the measure values along an LRS segment are decreasing.
ST_Is_Measure_Increasing – Checks if the measure values along an LRS segment are increasing (that is, ascending in numerical value).
ST_Reset_Measure – Sets all measures of a measured linesting to null values. Wipes all existing assigned measures.
ST_Measure_Range – Returns the measure range of a measured linestring. Range is the difference between the first and last measure values.
ST_Start_Measure – Returns the measure of the first vertex in a measured linestring.
ST_End_Measure – Returns the measure of the last vertex in a measured linestring.
ST_Measure_To_Percentage – Returns the percentage (0 to 100) of the measured within the measured range of a measured linestring.
ST_Percentage_To_Measure – Returns the measure associated associated with a position within a measured linestring expressed as a percentage (0 to 100).
ST_AddMeasure – : Return a derived geometry with measure elements linearly interpolated between the start and end points.
ST_Reverse_Measure – Reverses the measure values of measured linestring
ST_Scale_Geom_Segment – Returns the geometry object resulting from a measure scaling operation on a geometric segment.
ST_isMeasured – A function that tests whether an sdo_geometry contains LRS measures
ST_getMeasureDimension – A function returns the dimension holding the LRS measure
ST_Set_Pt_Measure – Sets measure of vertex nearest to the supplied point
ST_Get_Point – Returns the vertex associated with the supplied point number
ST_Start_Point – Returns the first vertex in the supplied geometry if exists
ST_End_Point – Returns the last vertex in the supplied geometry if exists
ST_Point_Text – Returns the vertex associated with the supplied point number as formatted text
ST_Start_point_text – Returns the first vertex in the supplied geometry as formatted text
ST_End_point_text – Returns the last vertex in the supplied geometry as formatted text
Wrappers for PostGIS and Jaspa
ST_Line_Locate_Point – Computes the fraction of a Line from the closest point on the line to the given point.
ST_Locate_ALong_Measure – Extracts Points from a Geometry object that have the specified m coordinate value.
ST_Locate_Between_Measures ST_Locate_Between_Measures(bytea Geometry, double start_M, double end_M)
ST_Line_SubString – Line ST_Line_Substring(Bytea Geometry, Double Startfraction, Double Endfraction)
ST_Locate_Along_Elevation ST_Locate_Along_Elevation(bytea Geometry, double Z)
ST_Locate_Between_Elevations ST_Locate_Between_Elevations(Bytea Geometry, Double Start_Z, Double End_Z)
ST_Line_Interpolate_Point – Returns the Coordinates for the point on the line at the given fraction.
ST_Project_Point ST_Project_Point(bytea Line, bytea Point)
Project_PT – Wrapper presenting SDO_LRS.PROJECT_PT interface
Define_Geom_Segment – Wrapper presenting SDO_LRS.DEFNIE_GEOM_SEGMENT interface
Convert_To_Lrs_Geom – Wrapper to look like SDO_LRS.CONVERT_TO_LRS_GEOM
Clip_Geom_Segment – Wrapper to look like SDO_LRS.CLIP_GEOM_SEGMENT
Offset_Geom_Segment – Wrapper to look like SDO_LRS.OFFSET_GEOM_SEGMENT
geom_segment_length – Wrapper for sdo_length as is function in SDO_LRS.GEOM_SEGMENT_LENGTH
ST_To2D – Converts a geometry to a 2D geometry
ST_To3D – Converts a 2D or 4D geometry to a 3D geometry
ST_DownTo3D – Converts a 4D geometry to a 3D geometry
ST_Fix3DZ Precis – Checks the Z ordinate in the SDO_GEOMETRY and if NULL changes to p_default_z value
ST_Reverse_Geometry – Reverses ordinates in supplied sdo_geometry’s sdo_ordinate_array.
ST_Parallel – Function that moves the supplied linestring left/right a fixed amount. Bends in the linestring, when moved, can remain vertex-connected or be converted to curves.
ST_RoundOrdinates – Rounds ordinate values (sdo_ordinate_array) of an sdo_geometry
ST_hasElementCircularArcs – A function that tests whether an sdo_geometry element contains circular arcs
ST_hasRectangles – A function that tests whether an sdo_geometry contains rectangles
ST_Vectorize – Places a geometry”s coordinates into a pipelined vector data structure.
ST_GetNumRings – Returns Number of Rings in a polygon/mutlipolygon.
ST_hasCircularArcs – A function that tests whether an sdo_geometry contains circular arcs
ST_FindLineIntersection – Find the point where two vectors intersect.
ST_AngleBetween3Points – Return the angle in Radians. Returns a value between PI and -PI.
Generate_Series – Function that generates a series of numbers mimicking PostGIS’s function with the same name