PDF (US Ltr)
- 26.8Mb
PDF (A4)
- 26.8Mb
これらの関数は、GeometryCollection
値のプロパティーを返します。
-
GeometryCollection
値gc
内のN
番目の幾何図形を返します。幾何図形の番号は 1 から始まります。mysql> SET @gc = 'GeometryCollection(Point(1 1),LineString(2 2, 3 3))'; mysql> SELECT AsText(GeometryN(GeomFromText(@gc),1)); +----------------------------------------+ | AsText(GeometryN(GeomFromText(@gc),1)) | +----------------------------------------+ | POINT(1 1) | +----------------------------------------+
-
GeometryCollection
値gc
内の幾何図形の数を返します。mysql> SET @gc = 'GeometryCollection(Point(1 1),LineString(2 2, 3 3))'; mysql> SELECT NumGeometries(GeomFromText(@gc)); +----------------------------------+ | NumGeometries(GeomFromText(@gc)) | +----------------------------------+ | 2 | +----------------------------------+