These functions return properties of
          GeometryCollection values.
        
              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) | +----------------------------------------+
              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 | +----------------------------------+

User Comments
Add your own comment.