Oracle 5.0 Reference Manual page 1015

Table of Contents

Advertisement

mysql>
SET @poly =
->
GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))');
mysql>
SELECT GeometryType(@poly),AsText(Centroid(@poly));
+---------------------+--------------------------------------------+
| GeometryType(@poly) | AsText(Centroid(@poly))
+---------------------+--------------------------------------------+
| POLYGON
+---------------------+--------------------------------------------+
The OpenGIS specification also defines the following function, which MySQL does not implement:
PointOnSurface(mpoly)
Returns a
12.16.5.2.7.
GeometryCollection
These functions return properties of
GeometryN(gc,N)
Returns the N-th geometry in the
beginning with 1.
mysql>
SET @gc = 'GeometryCollection(Point(1 1),LineString(2 2, 3 3))';
mysql>
SELECT AsText(GeometryN(GeomFromText(@gc),1));
+----------------------------------------+
| AsText(GeometryN(GeomFromText(@gc),1)) |
+----------------------------------------+
| POINT(1 1)
+----------------------------------------+
NumGeometries(gc)
Returns the number of geometries in the
mysql>
SET @gc = 'GeometryCollection(Point(1 1),LineString(2 2, 3 3))';
mysql>
SELECT NumGeometries(GeomFromText(@gc));
+----------------------------------+
| NumGeometries(GeomFromText(@gc)) |
+----------------------------------+
|
+----------------------------------+
12.16.5.3. Functions That Create New Geometries from Existing Ones
The following sections describe functions that take geometry values as arguments and return new
geometry values.
12.16.5.3.1. Geometry Functions That Produce New Geometries
Section 12.16.5.2,
geometries from existing ones. See that section for descriptions of these functions:
Envelope(g)
StartPoint(ls)
EndPoint(ls)
PointN(ls,N)
ExteriorRing(poly)
InteriorRingN(poly,N)
Spatial Analysis Functions
| POINT(4.958333333333333 4.958333333333333) |
value that is guaranteed to be on the
Point
Functions
[995]
GeometryCollection
[995]
"Geometry
Property
[990]
[993]
[992]
[992]
[994]
[994]
MultiPolygon
GeometryCollection
|
GeometryCollection
2 |
Functions", discusses several functions that construct new
995
|
value mpoly.
values.
value gc. Geometries are numbered
value gc.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents