STSetM — Function that adds or updates (replaces) M value of supplied geometry point.
Function STSetM ( @p_point geometry, @p_measure float, @p_round_xy int = 3, @p_round_zm int = 2 ) Returns geometry
Function that adds/updates M ordinate of the supplied @p_point.
The updated coordinate’s XY ordinates are rounded to @p_round_xy number of decimal digits of precision.
The updated coordinate’s ZM ordinates are rounded to @p_round_ZM number of decimal digits of precision.
Wrapper over STSetMeasure.
@p_point (geometry) - Supplied point geometry. @p_measure (float) - New M value. @p_round_xy (int) - Decimal degrees of precision to which calculated XY ordinates are rounded. @p_round_zm (int) - Decimal degrees of precision to which calculated ZM ordinates are rounded.
Returns input point with the measure value supplied by @p_measure.
select [lrs].[STSetM]( geometry::STPointFromText ( 'POINT(0 0)', 0 ), 1, 3, 2 ).AsTextZM() as updatedPoint go updatedPoint POINT(0 0 NULL 1)