Oracle 5.0 Reference Manual page 1007

Table of Contents

Advertisement

Constructs a
collection of closed
12.16.4.2.3. Creating Geometry Values Using MySQL-Specific Functions
MySQL provides a set of useful nonstandard functions for creating geometry values. The functions
described in this section are MySQL extensions to the OpenGIS specification.
As of MySQL 5.0.82, these functions produce geometry objects from either WKB values or geometry
objects as arguments. If any argument is not a proper WKB or geometry representation of the proper
object type, the return value is NULL.
Before MySQL 5.0.82, these functions produce
geometry values with no SRID from WKB arguments. The WKB value returned from these functions
can be converted to geometry arguments by using them as the first argument to functions in the
GeomFromWKB()
For example, as of MySQL 5.0.82, you can insert the geometry return value from
directly into a
INSERT INTO t1 (pt_col) VALUES(Point(1,2));
Prior to MySQL 5.0.82, convert the WKB return value to a
INSERT INTO t1 (pt_col) VALUES(GeomFromWKB(Point(1,2)));
GeometryCollection(g1,g2,...)
Constructs a GeometryCollection.
LineString(pt1,pt2,...)
Constructs a
of arguments is less than two, the return value is NULL.
MultiLineString(ls1,ls2,...)
Constructs a
MultiPoint(pt1,pt2,...)
Constructs a
MultiPolygon(poly1,poly2,...)
Constructs a
Point(x,y)
Constructs a
Polygon(ls1,ls2,...)
Constructs a
any argument does not represent a
the return value is NULL.
12.16.4.3. Creating Spatial Columns
MySQL provides a standard way of creating spatial columns for geometry types, for example, with
CREATE TABLE
NDB, BDB, and
Creating a Spatially Enabled MySQL Database
value from a
Polygon
values.
LineString
[986]
function family.
column:
Point
[987]
value from a number of
LineString
value using
MultiLineString
[987]
value using
MultiPoint
value from a set of
MultiPolygon
[987]
using its coordinates.
Point
[987]
value from a number of
Polygon
or
TABLE. Currently, spatial columns are supported for MyISAM, InnoDB,
ALTER
tables. (Support for storage engines other than
ARCHIVE
value in WKB format containing an arbitrary
MultiLineString
values containing WKB representations of
BLOB
Point
[987]
Point
[987]
LineString
or WKB
Point
Point
[987]
Polygon
LineString
(that is, not a closed and simple LineString),
LinearRing
987
Point()
before inserting it:
or WKB
arguments. If the number
Point
or WKB
LineString
arguments.
or WKB
arguments.
Polygon
or WKB
LineString
was added in MySQL
MyISAM
[987]
arguments.
arguments. If

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents