(mysql.info.gz) Geometrycollection property functions
Info Catalog
(mysql.info.gz) Multipolygon property functions
(mysql.info.gz) Geometry property functions
18.5.2.7 `GeometryCollection' Functions
.......................................
`GeometryN(GC,N)'
Returns the N-th geometry in the `GeometryCollection' value GC.
Geometry numbers begin at 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) |
+----------------------------------------+
`NumGeometries(GC)'
Returns the number of geometries in the `GeometryCollection' value
GC.
mysql> SET @gc = 'GeometryCollection(Point(1 1),LineString(2 2, 3 3))';
mysql> SELECT NumGeometries(GeomFromText(@gc));
+----------------------------------+
| NumGeometries(GeomFromText(@gc)) |
+----------------------------------+
| 2 |
+----------------------------------+
Info Catalog
(mysql.info.gz) Multipolygon property functions
(mysql.info.gz) Geometry property functions
automatically generated byinfo2html