st_ndims 関数

適用対象:はい Databricks SQL チェックが Databricks Runtime 17.1 以降" とマークされているチェック

Important

GEOGRAPHY 値のサポートは パブリック プレビュー段階です。 GEOMETRY 値のサポートが 一般公開されています

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

入力 GEOGRAPHY または GEOMETRY 値の座標寸法を返します。

Syntax

st_ndims ( geoExpr )

Arguments

  • geoExpr: GEOGRAPHY または GEOMETRY の値。

Returns

入力INTまたはGEOGRAPHY値の座標寸法を表すGEOMETRY型の値。

入力がNULL場合、この関数はNULLを返します。

Examples

-- Returns the number of dimensions of a 2D point geometry.
> SELECT st_ndims(st_geomfromtext('POINT(10 34)'));
  2
-- Returns the number of dimensions of a 3D point geometry.
> SELECT st_ndims(st_geomfromgeojson('{"type":"Point","coordinates":[10,34,55]}'));
  3
-- Returns the number of dimensions of a 3D point geography.
> SELECT st_ndims(st_geogfromtext('POINT M (10 34 48)'));
  3
-- Returns the number of dimensions of a 4D point geography.
> SELECT st_ndims(st_geogfromtext('POINT ZM (10 34 48 -24)'));
  4