ST_GEOMETRYN
Syntax
ST_GeometryN(gc,N) GeometryN(gc,N)
Description
Returns the N-th geometry in the GeometryCollection gc
. Geometries are numbered beginning with 1.
ST_GeometryN()
and GeometryN()
are synonyms.
Example
SET @gc = 'GeometryCollection(Point(1 1),LineString(12 14, 9 11))'; SELECT AsText(GeometryN(GeomFromText(@gc),1)); +----------------------------------------+ | AsText(GeometryN(GeomFromText(@gc),1)) | +----------------------------------------+ | POINT(1 1) | +----------------------------------------+
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.
© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/geometryn/