ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS for Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

ST_NumGeometries

  • 定義
  • 構文
  • 戻り値のタイプ
  • 例

定義

ST_NumGeometries は、ジオメトリ コレクションを入力として、コレクション内にあるジオメトリの数を返します。

構文

Oracle

sde.st_numgeometries (multipoint1 sde.st_geometry)
sde.st_numgeometries (multiline1 sde.st_geometry)
sde.st_numgeometries (multipolygon1 sde.st_geometry)

PostgreSQL

sde.st_numgeometries (geometry1 sde.st_geomcollection)

SQLite

st_numgeometries (geometry1 geometryblob)

戻り値のタイプ

Integer

例

次の例では、sample_numgeom テーブルを作成します。このテーブルに、1 つのマルチポリゴンと 1 つのマルチポイントを挿入します。SELECT ステートメントで ST_NumGeometries 関数を使用して、各ジオメトリ内にあるジオメトリ (またはフィーチャ) の数を判定します。

Oracle

CREATE TABLE sample_numgeom (
 id integer,
 geometry sde.st_geometry
);
INSERT INTO SAMPLE_NUMGEOM VALUES (
 1,
 sde.st_multipolygon ('multipolygon (((3 3, 4 6, 5 3, 3 3), (8 24, 9 25, 1 28, 8 24), (13 33, 7 36, 1 40, 10 43, 13 33)))', 4326)
);
INSERT INTO SAMPLE_NUMGEOM VALUES (
 2,
 sde.st_multipoint ('multipoint (1 2, 4 3, 5 6, 7 6, 8 8)', 4326)
);
SELECT id, sde.st_numgeometries (geometry) NUM_GEOMS_IN_COLL
 FROM SAMPLE_NUMGEOM;
ID          NUM_GEOMS_IN_COLL
  1                 3
  2                 5

PostgreSQL

CREATE TABLE sample_numgeom (
 id integer,
 geometry sde.st_geometry
);
INSERT INTO sample_numgeom VALUES (
 1,
 sde.st_multipolygon ('multipolygon (((3 3, 4 6, 5 3, 3 3), (8 24, 9 25, 1 28, 8 24), (13 33, 7 36, 1 40, 10 43, 13 33)))', 4326)
);
INSERT INTO sample_numgeom VALUES (
 2,
 sde.st_multipoint ('multipoint (1 2, 4 3, 5 6, 7 6, 8 8)', 4326)
);
SELECT id, sde.st_numgeometries (geometry) 
 AS "number of geometries"
 FROM sample_numgeom;
id          number of geometries
  1                 3
  2                 5

SQLite

CREATE TABLE sample_numgeom (
 id integer
);
SELECT AddGeometryColumn(
 NULL,
 'sample_numgeom',
 'geometry',
 4326,
 'geometry',
 'xy',
 'null'
);
INSERT INTO sample_numgeom VALUES (
 1,
 st_multipolygon ('multipolygon (((3 3, 4 6, 5 3, 3 3), (8 24, 9 25, 1 28, 8 24), (13 33, 7 36, 1 40, 10 43, 13 33)))', 4326)
);
INSERT INTO sample_numgeom VALUES (
 2,
 st_multipoint ('multipoint (1 2, 4 3, 5 6, 7 6, 8 8)', 4326)
);
SELECT id, st_numgeometries (geometry) 
 AS "number of geometries"
 FROM sample_numgeom;
id          number of geometries
  1                 3
  2                 5

関連トピック

  • SQLite の ST_Geometry ライブラリの読み込み

ArcGIS Desktop

  • ホーム
  • ドキュメント
  • サポート

ArcGIS プラットフォーム

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

  • 会社概要
  • 採用情報
  • Esri ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
Copyright © 2020 Esri. | プライバシー | リーガル