Z (geometry)#

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

Syntax#

.Z

Arguments#

arg_name

arg_comment

Return type#

float

Remarks#

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.

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

Example#

Create a Point instance with Z (elevation) and M (measure) values and use Z to fetch the Z value of the instance.

DECLARE @g geometry;
SET @g = geometry::STGeomFromText('POINT(1 2 3 4)', 0);
SELECT @g.Z;

See Also#