Top 5 Recent Articles
- Biography (1)
- Blog (26)
- Changes (1)
- Customers (1)
- Education (2)
- General Software (21)
- Image Catalog (2)
- Licensing (1)
- ManifoldGIS (3)
- MySQL Spatial (2)
- Networking and Routing (including Optimization) (3)
- Oracle Spatial (57)
- PostGIS (20)
- Press Releases (1)
- Source code (6)
- Space Curves (1)
- Spatial DB comparison (1)
- SQL (1)
- SQL Server Blog (13)
- SQL Server Spatial (General) (15)
- SQL Server Spatial (LRS) (37)
- Stored Procedure (2)
- XML (5)
STSetMeasure is a TSQL function that adds or updates (replaces) M value of supplied geometry point.
TSQL Function Specification.
Function [lrs].[STSetMeasure] ( @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.
@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.
The function returns the supplied point with its M ordinate set to the supplied measure value.
SELECT [lrs].[STSetMeasure] ( geometry::STPointFromText('POINT(0 0)',0), 1, 3, 2 ).AsTextZM() as updatedPoint GO updatedPoint POINT(0 0 NULL 1)