Was this helpful?
Add_Measure
ADD_MEASURE (Geometry g, float f1, float f2);
Alias: ST_ADD_MEASURE
Takes any Linestring or MultiLinestring and adds M ordinates to it. The first M ordinate will be equal to f1 and the last M ordinate will be equal to f2. Any ordinates in between are calculated as the distance from the starting point.
The first argument g must be of type Linestring, LinestringZ, LinestringM, LinestringZM, MultiLinestring, MultiLinestringZ, MultiLinestringM, or MultiLinestringZM.
The second and third arguments, f1 and f2, indicate the measurement M of the first and last point, the measurements M between will be calculated using these two values.
Result type: Same type as g with added M ordinate.
Example:
SELECT ASTEXT(ADD_MEASURE(GEOMFROMTEXT('LINESTRING(0 0, 5 0, 10 10)'), 0, 10));
-------------
col1
-------------
LINESTRING M(0 0 0, 5 0 3.09017, 10 10 10)
-------------
Last modified date: 11/28/2023