The following example creates a geometry Point instance representing the point (3, 4) with an SRID of 0.
|
DECLARE @g geometry;
SET @g = geometry::STGeomFromText('POINT (3 4)', 0); |
The next example creates a geometry Point instance representing the point (3, 4) with a Z (elevation) value of 7, an M (measure) value of 2.5, and the default SRID of 0.
|
DECLARE @g geometry;
SET @g = geometry::Parse('POINT(3 4 7 2.5)'); |
The final example returns the X, Y, Z, and M values for the geometry Point instance.
|
SELECT @g.STX;
SELECT @g.STY;
SELECT @g.Z;
SELECT @g.M; |
Z and M values may be explicitly specified as NULL, as shown in the following example.
|
DECLARE @g geometry;
SET @g = geometry::Parse('POINT(3 4 NULL NULL)');
|