Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Learn about Well-Known Text (WKT) in MariaDB Server. This section details how to represent and store geometric data in a text format, essential for human-readable spatial data exchange.
Understand the Well-Known Text (WKT) format. This section describes the standard ASCII representation for exchanging geometric data.
Synonym for ST_AsText. Converts a geometry value from its internal format to its Well-Known Text (WKT) representation.
A synonym for ST_AsText().
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiLineStringFromText. Constructs a MultiLineString value from its WKT representation and an optional SRID.
A synonym for MLineFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomCollFromText. Constructs a GeometryCollection value from its WKT representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_LineFromText. Constructs a LineString value from its WKT representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_AsText. Converts a geometry value from its internal format to its Well-Known Text (WKT) representation.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiPointFromText. Constructs a MultiPoint value from its WKT representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_LineFromText. Constructs a LineString value from its WKT representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomCollFromText. Constructs a GeometryCollection value from its WKT representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomFromText. Constructs a geometry value of any type from its WKT representation and an optional SRID.
A synonym for ST_GeomFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomFromText. Constructs a geometry value of any type from its WKT representation and an optional SRID.
A synonym for ST_GeomFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiPolygonFromText. Constructs a MultiPolygon value from its WKT representation and an optional SRID.
A synonym for MPolyFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_PolyFromText. Constructs a Polygon value from its WKT representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_PolyFromText. Constructs a Polygon value from its WKT representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_PointFromText. Constructs a Point value from its WKT representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Constructs a MultiPoint value using its WKT representation and an optional SRID.
A synonym for ST_GeomFromText.
This page is licensed: CC BY-SA / Gnu FDL
Constructs a MultiPolygon value using its WKT representation and an optional SRID.
A synonym for ST_GeomFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_LineFromText. Constructs a LineString value from its WKT representation and an optional SRID.
A synonym for ST_LineFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiPointFromText. Constructs a MultiPoint value from its WKT representation and an optional SRID.
A synonym for ST_GeomFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiLineStringFromText. Constructs a MultiLineString value from its WKT representation and an optional SRID.
A synonym for ST_GeomFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomCollFromText. Constructs a GeometryCollection value from its WKT representation and an optional SRID.
A synonym for ST_GeomCollFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiLineStringFromText. Constructs a MultiLineString value from its WKT representation and an optional SRID.
A synonym for ST_GeomFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomFromText. Constructs a geometry value of any type from its WKT representation and an optional SRID.
A synonym for ST_GeomFromText.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_PolyFromText. Constructs a Polygon value from its WKT representation and an optional SRID.
A synonym for ST_PolyFromText.
This page is licensed: CC BY-SA / Gnu FDL
MPolyFromText() and MultiPolygonFromText() are synonyms.This page is licensed: GPLv2, originally from fill_help_tables.sql
MPolyFromText(wkt[,srid])
MultiPolygonFromText(wkt[,srid])CREATE TABLE gis_multi_polygon (g MULTIPOLYGON);
SHOW FIELDS FROM gis_multi_polygon;
INSERT INTO gis_multi_polygon VALUES
(MultiPolygonFromText('MULTIPOLYGON(
((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),
((59 18,67 18,67 13,59 13,59 18)))')),
(MPolyFromText('MULTIPOLYGON(
((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),
((59 18,67 18,67 13,59 13,59 18)))')),
(MPolyFromWKB(AsWKB(MultiPolygon(Polygon(
LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))));Synonym for ST_MultiLineStringFromText. Constructs a MultiLineString value from its WKT representation and an optional SRID.
MLineFromText(wkt[,srid])
MultiLineStringFromText(wkt[,srid])Constructs a MULTILINESTRING value using its WKT representation and SRID.
MLineFromText() and MultiLineStringFromText() are synonyms.
This page is licensed: GPLv2, originally from
Synonym for ST_MultiPointFromText. Constructs a MultiPoint value from its WKT representation and an optional SRID.
MPointFromText(wkt[,srid])
MultiPointFromText(wkt[,srid])Constructs a MULTIPOINT value using its WKT representation and SRID.
MPointFromText() and MultiPointFromText() are synonyms.
This page is licensed: GPLv2, originally from
Synonym for ST_AsText. Converts a geometry value from its internal format to its Well-Known Text (WKT) representation.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
CREATE TABLE gis_multi_line (g MULTILINESTRING);
SHOW FIELDS FROM gis_multi_line;
INSERT INTO gis_multi_line VALUES
(MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')),
(MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
(MLineFromWKB(AsWKB(MultiLineString(
LineString(Point(1, 2), Point(3, 5)),
LineString(Point(2, 5), Point(5, 8), Point(21, 7))))));CREATE TABLE gis_multi_point (g MULTIPOINT);
SHOW FIELDS FROM gis_multi_point;
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)))));GeomFromText(), GeometryFromText(), ST_GeomFromText(), ST_GeometryFromText(), ST_MultiLineStringFromText, ST_MLineFromText, ST_MultiPolyFromText and ST_MPolygonFromText are all synonyms.This page is licensed: GPLv2, originally from fill_help_tables.sql
ST_GeomFromText(wkt[,srid])
ST_GeometryFromText(wkt[,srid])
GeomFromText(wkt[,srid])
GeometryFromText(wkt[,srid])
ST_MultiLineStringFromText(wkt[,srid])
ST_MLineFromText(wkt[,srid])
ST_MPointFromText(wkt[,srid])
ST_MultiPointFromText(wkt[,srid])ST_GeomCollFromText(), ST_GeometryCollectionFromText(), GeomCollFromText() and GeometryCollectionFromText() are all synonyms.This page is licensed: GPLv2, originally from fill_help_tables.sql
ST_GeomCollFromText(wkt[,srid])
ST_GeometryCollectionFromText(wkt[,srid])
GeomCollFromText(wkt[,srid])
GeometryCollectionFromText(wkt[,srid])ST_AsText(), AsText(), ST_AsWKT() and AsWKT() are all synonyms.This page is licensed: GPLv2, originally from fill_help_tables.sql
ST_AsText(g)
AsText(g)
ST_AsWKT(g)
AsWKT(g)SET @g = ST_GEOMFROMTEXT('POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1))');CREATE TABLE gis_geometrycollection (g GEOMETRYCOLLECTION);
SHOW FIELDS FROM gis_geometrycollection;
INSERT INTO gis_geometrycollection VALUES
(GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
(GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))))),
(GeomFromText('GeometryCollection()')),
(GeomFromText('GeometryCollection EMPTY'));SET @g = 'LineString(1 1,4 4,6 6)';
SELECT ST_AsText(ST_GeomFromText(@g));
+--------------------------------+
| ST_AsText(ST_GeomFromText(@g)) |
+--------------------------------+
| LINESTRING(1 1,4 4,6 6) |
+--------------------------------+Constructs a LineString value using its WKT representation and an optional SRID.
ST_LineFromText(wkt[,srid])
ST_LineStringFromText(wkt[,srid])
LineFromText(wkt[,srid])
LineStringFromText(wkt[,srid])Constructs a LINESTRING value using its WKT representation and SRID.
ST_LineFromText(), ST_LineStringFromText(), ST_LineFromText() and ST_LineStringFromText() are all synonyms.
This page is licensed: GPLv2, originally from
Constructs a Point value using its WKT representation and an optional SRID.
Constructs a Polygon value using its WKT representation and an optional SRID.
ST_PolyFromText(wkt[,srid])
ST_PolygonFromText(wkt[,srid])
PolyFromText(wkt[,srid])
PolygonFromText(wkt[,srid])Constructs a POLYGON value using its WKT representation and SRID.
ST_PolyFromText(), ST_PolygonFromText(), PolyFromText() and ST_PolygonFromText() are all synonyms.
This page is licensed: GPLv2, originally from
CREATE TABLE gis_line (g LINESTRING);
SHOW FIELDS FROM gis_line;
INSERT INTO gis_line VALUES
(LineFromText('LINESTRING(0 0,0 10,10 0)')),
(LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')),
(LineStringFromWKB(AsWKB(LineString(Point(10, 10), Point(40, 10)))));CREATE TABLE gis_point (g POINT);
SHOW FIELDS FROM gis_point;
INSERT INTO gis_point VALUES
(PointFromText('POINT(10 10)')),
(PointFromText('POINT(20 10)')),
(PointFromText('POINT(20 20)')),
(PointFromWKB(AsWKB(PointFromText('POINT(10 20)'))));CREATE TABLE gis_polygon (g POLYGON);
INSERT INTO gis_polygon VALUES
(PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),
(PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))'));Constructs a MultiLineString value using its WKT representation and an optional SRID.
A synonym for ST_GeomFromText.
This page is licensed: CC BY-SA / Gnu FDL