Export (0) Print
Expand All

Z (geometry Data Type)

The Z (elevation) value of the instance. The semantics of the elevation value are user-defined.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.

SQL Server type: float

CLR type: SqlDouble

The value of this property will be null if the geometry instance is not a point, as well as for any Point instance for which it is not set.

This property is read-only.

Z-coordinates are not used in any calculations made by the library and is not carried through any library calculations.

The following example creates a Point instance with Z (elevation) and M (measure) values and uses Z to fetch the Z value of the instance.

DECLARE @g geometry;
SET @g = geometry::STGeomFromText('POINT(1 2 3 4)', 0);
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft