ST_Y

定義

ST_Y は、ST_Point を入力パラメータとして、その Y 座標を返します。

構文

sde.st_y (p1 sde.st_point)

戻り値のタイプ

Double precision

行を一意に識別する gid 列と、pt1 ポイント列を持つ y_test テーブルを作成します。

CREATE TABLE y_test (gid integer unique, pt1 sde.st_point);

INSERT ステートメントは、2 つの行を挿入します。1 つは、Z 座標またはメジャー値のないポイントです。もう 1 つは、Z 座標とメジャー値があるポイントです。

Oracle

INSERT INTO Y_TEST VALUES (
1,
sde.st_pointfromtext ('point (10.02 20.01)', 0)
);

INSERT INTO Y_TEST VALUES (
2,
sde.st_pointfromtext ('point zm(10.02 20.01 5.0 7.0)', 0)
);

PostgreSQL

INSERT INTO y_test VALUES (
1,
sde.st_point ('point (10.02 20.01)', 0)
);

INSERT INTO y_test VALUES (
2,
sde.st_point ('point zm(10.02 20.01 5.0 7.0)', 0)
);

クエリは、ポイントの gid 列と倍精度の Y 座標をリストします。

Oracle

SELECT gid, sde.st_y (pt1) "The Y coordinate"
FROM Y_TEST;

       GID     The Y coordinate

         1          20.01
         2          20.01

PostgreSQL

SELECT gid, sde.st_y (pt1) 
AS "The Y coordinate"
FROM y_test;

       gid    The Y coordinate

         1          20.01
         2          20.01

3/6/2012