名前

ST_X — ポイントのX値を返します。

概要

float ST_X(geometry a_point);

説明

ポイントのX値を返します。引数が有効でない場合にはNULLを返します。入力はポイントでなければなりません。

[注記]

ジオメトリのX値の最小値と最大値を得るには??????を使います。

This method implements the SQL/MM specification. SQL-MM 3: 6.1.3

This function supports 3d and will not drop the z-index.

SELECT ST_X(ST_GeomFromEWKT('POINT(1 2 3 4)'));
 st_x
------
        1
(1 row)

SELECT ST_Y(ST_Centroid(ST_GeomFromEWKT('LINESTRING(1 2 3 4, 1 1 1 1)')));
 st_y
------
  1.5
(1 row)

                

関連情報

ST_Centroid, ???, ST_M, ???, ???, ST_Y, ST_Z