Creating a Spatially Enabled MySQL Database
985
•
MULTIPOINT
•
MULTILINESTRING
•
MULTIPOLYGON
•
GEOMETRYCOLLECTION
GEOMETRYCOLLECTION
can store a collection of objects of any type. The other collection types
(
MULTIPOINT
,
MULTILINESTRING
,
MULTIPOLYGON
, and
GEOMETRYCOLLECTION
) restrict collection
members to those having a particular geometry type.
12.16.4.2. Creating Spatial Values
This section describes how to create spatial values using Well-Known Text and Well-Known Binary
functions that are defined in the OpenGIS standard, and using MySQL-specific functions.
12.16.4.2.1. Creating Geometry Values Using WKT Functions
MySQL provides a number of functions that take as arguments a Well-Known Text representation and,
optionally, a spatial reference system identifier (SRID). They return the corresponding geometry.
GeomFromText()
[985]
accepts a WKT of any geometry type as its first argument. An
implementation also provides type-specific construction functions for construction of geometry values of
each geometry type.
•
GeomCollFromText(wkt[,srid])
[985]
,
GeometryCollectionFromText(wkt[,srid])
[985]
Constructs a
GEOMETRYCOLLECTION
value using its WKT representation and SRID.
•
GeomFromText(wkt[,srid])
[985]
,
GeometryFromText(wkt[,srid])
[985]
Constructs a geometry value of any type using its WKT representation and SRID.
•
LineFromText(wkt[,srid])
[985]
,
LineStringFromText(wkt[,srid])
[985]
Constructs a
LINESTRING
value using its WKT representation and SRID.
•
MLineFromText(wkt[,srid])
[985]
,
MultiLineStringFromText(wkt[,srid])
[985]
Constructs a
MULTILINESTRING
value using its WKT representation and SRID.
•
MPointFromText(wkt[,srid])
[985]
,
MultiPointFromText(wkt[,srid])
[985]
Constructs a
MULTIPOINT
value using its WKT representation and SRID.
•
MPolyFromText(wkt[,srid])
[985]
,
MultiPolygonFromText(wkt[,srid])
[985]
Constructs a
MULTIPOLYGON
value using its WKT representation and SRID.
•
PointFromText(wkt[,srid])
[985]
Constructs a
POINT
value using its WKT representation and SRID.
•
PolyFromText(wkt[,srid])
[985]
,
PolygonFromText(wkt[,srid])
[985]
Constructs a
POLYGON
value using its WKT representation and SRID.
The OpenGIS specification also defines the following optional functions, which MySQL does not
implement. These functions construct
Polygon
or
MultiPolygon
values based on the WKT
representation of a collection of rings or closed
LineString
values. These values may intersect.
•
BdMPolyFromText(wkt,srid)
[985]
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...