st_point 機能

適用対象:チェック チェック はい Databricks SQL チェック はい Databricks ランタイム 17.1 以上 チェック はい Lakehouse//RT

注

この機能は、Databricks SQL クラシック ウェアハウスでは使用できません。 Databricks SQL ウェアハウスの詳細については、 SQL ウェアハウスの種類に関するページを参照してください。

指定した X 座標と Y 座標と SRID 値 (指定した場合) を持つポイント GEOMETRY 値を返します。

Syntax

st_point ( x, y [, srid] )

Arguments

  • x: 点の最初の座標を表す DOUBLE 値。
  • y: DOUBLE 値で、点の第2座標を表します。
  • srid: ポイントの任意のSRID値。 既定値は 0 です。

Returns

指定した座標を持つ点を表す GEOMETRY型の値。

いずれかの入力がNULLされている場合、関数はNULLを返します。

Examples

-- Creates a point with coordinates (10, 34) and default SRID 0.
> SELECT st_astext(st_point(10.0, 34.0));
  POINT(10 34)
-- Returns the SRID of a point created with default SRID.
> SELECT st_srid(st_point(10.0, 34.0));
  0
-- Creates a point with coordinates (10, 34) and SRID 3857.
> SELECT st_srid(st_point(10.0, 34.0, 3857));
  3857

-- When invoking st_point with a literal for the SRID value, the output geometry type inherits the SRID value.
> SELECT typeof(st_point(10.0, 34.0, 4267));
  geometry(4267)