Oracle 5.0 Reference Manual page 1010

Table of Contents

Advertisement

Converts a value in internal geometry format to its WKB representation and returns the binary result.
SELECT AsBinary(g) FROM geom;
AsText(g)
Converts a value in internal geometry format to its WKT representation and returns the string result.
mysql>
SET @g = 'LineString(1 1,2 2,3 3)';
mysql>
SELECT AsText(GeomFromText(@g));
+--------------------------+
| AsText(GeomFromText(@g)) |
+--------------------------+
| LINESTRING(1 1,2 2,3 3)
+--------------------------+
GeomFromText(wkt[,srid])
Converts a string value from its WKT representation into internal geometry format and returns the
result. A number of type-specific functions are also supported, such as
and
LineFromText()
Functions".
GeomFromWKB(wkb[,srid])
Converts a binary value from its WKB representation into internal geometry format and returns the
result. A number of type-specific functions are also supported, such as
and
LineFromWKB()
Functions".
12.16.5.2.
Geometry
Each function that belongs to this group takes a geometry value as its argument and returns some
quantitative or qualitative property of the geometry. Some functions restrict their argument type. Such
functions return
returns
NULL
12.16.5.2.1. General Geometry Functions
The functions listed in this section do not restrict their argument and accept a geometry value of any
type.
Dimension(g)
Returns the inherent dimension of the geometry value g. The result can be –1, 0, 1, or 2. The
meaning of these values is given in
mysql>
SELECT Dimension(GeomFromText('LineString(1 1,2 2)'));
+------------------------------------------------+
| Dimension(GeomFromText('LineString(1 1,2 2)')) |
+------------------------------------------------+
|
+------------------------------------------------+
Envelope(g)
Returns the Minimum Bounding Rectangle (MBR) for the geometry value g. The result is returned as
a
Polygon
The polygon is defined by the corner points of the bounding box:
POLYGON((MINX MINY, MAXX MINY, MAXX MAXY, MINX MAXY, MINX MINY))
mysql>
SELECT AsText(Envelope(GeomFromText('LineString(1 1,2 2)')));
Spatial Analysis Functions
[990],
[990]
AsWKT(g)
|
[985]
[985]. See
[986]
[986]. See
Section 12.16.4.2.2, "Creating Geometry Values Using WKB
Property Functions
if the argument is of an incorrect geometry type. For example,
NULL
if the object type is neither
[990]
[990]
value.
Section 12.16.4.2.1, "Creating Geometry Values Using WKT
nor MultiPolygon.
Polygon
Section 12.16.2.2, "Class
1 |
990
PointFromText()
PointFromWKB()
Area()
Geometry".
[985]
[986]
[993]

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents