Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Development
 Point
SQL Server 2008 Books Online (August 2008)
Point

In SQL Server spatial data, a Point is a 0-dimensional object representing a single location and may contain Z (elevation) and M (measure) values.

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)');
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker