MULTIPOINT
Syntax
MultiPoint(pt1,pt2,...)
Description
Constructs a WKB MultiPoint value using WKB Point arguments. If any argument is not a WKB Point, the return value is NULL
.
Examples
SET @g = ST_GEOMFROMTEXT('MultiPoint( 1 1, 2 2, 5 3, 7 2, 9 3, 8 4, 6 6, 6 9, 4 9, 1 5 )'); CREATE TABLE gis_multi_point (g MULTIPOINT); INSERT INTO gis_multi_point VALUES (MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')), (MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')), (MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4, 10)))));
MultiPoint_Example:
CREATE TABLE multipoint_example ( m MULTIPOINT );
INSERT INTO multipoint_example VALUES (ST_MultiPointFromText('MULTIPOINT(0 0, 1 0, 1 1, 0 1)')), (ST_MPointFromText('MULTIPOINT(1 1, 2 2, 3 3, 4 4)')), (MultiPoint(Point(0, 0), Point(1, 1)));
INSERT INTO multipoint_example VALUES (MultiPointFromText('MULTIPOINT(0 0, 1 0, 1 1, 0 1)')), (MPointFromText('MULTIPOINT(1 1, 2 2, 3 3, 4 4)')), (MultiPoint(Point(0, 0), Point(1, 1)));
SELECT ST_AsWKT(m) FROM multipoint_example;
+-----------------------------+ | ST_AsWKT(m) | +-----------------------------+ | MULTIPOINT(0 0,1 0,1 1,0 1) | | MULTIPOINT(1 1,2 2,3 3,4 4) | | MULTIPOINT(0 0,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.