The following example shows how to create a geometry LineString instance with three points and an SRID of 0:
|
DECLARE @g geometry;
SET @g = geometry::STGeomFromText('LINESTRING(1 1, 2 4, 3 9)', 0); |
Each point in the LineString instance may contain Z (elevation) and M (measure) values. This example adds M values to the LineString instance created in the example above. M and Z can be null values.
|
DECLARE @g geometry;
SET @g = geometry::STGeomFromText('LINESTRING(1 1 NULL 0, 2 4 NULL 12.3, 3 9 NULL 24.5)', 0); |