DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info) geometrycollection-property-functions

Info Catalog (mysql.info) multipolygon-property-functions (mysql.info) geometry-property-functions
 
 16.5.2.7 `GeometryCollection' Functions
 .......................................
 
    * `GeometryN(GC,N)'
 
      Returns the N-th geometry in the `GeometryCollection' value GC.
      Geometries are numbered beginning with 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) multipolygon-property-functions (mysql.info) geometry-property-functions
automatically generated byinfo2html