ST_Z

Definition

ST_Z takes an ST_Point as an input parameter and return its z (elevation)-coordinate.

Syntax

sde.st_z (g1 sde.st_point)

Return type

Oracle

Number

PostgreSQL

Integer

Example

The z_test table is created with two columns: the id column, which uniquely identifies the row, and the geometry point column. The INSERT statement inserts a row into the z_test table.

CREATE TABLE z_test (id integer unique, geometry sde.st_point);

INSERT INTO z_test (id, geometry) VALUES (
1,
sde.st_point (2, 3, 32, 5, 0)
);

The SELECT statement lists the id column and the double-precision z-coordinate of the point inserted with the previous statement.

Oracle

SELECT id, sde.st_z (geometry) Z_COORD
FROM Z_TEST; 

        ID      Z_COORD

         1        32

PostgreSQL

SELECT id, sde.st_z (geometry) 
AS Z_COORD
FROM z_test; 

        id      z_coord

         1        32

2/5/2013