Spatial Analysis Functions
997
•
MBREqual(g1,g2)
[997]
Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of the two geometries
g1
and
g2
are the same.
•
MBRIntersects(g1,g2)
[997]
Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of the two geometries
g1
and
g2
intersect.
•
MBROverlaps(g1,g2)
[997]
Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of the two geometries
g1
and
g2
overlap. The term spatially overlaps is used if two geometries intersect and their intersection
results in a geometry of the same dimension but not equal to either of the given geometries.
•
MBRTouches(g1,g2)
[997]
Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of the two geometries
g1
and
g2
touch. Two geometries spatially touch if the interiors of the geometries do not intersect, but the
boundary of one of the geometries intersects either the boundary or the interior of the other.
•
MBRWithin(g1,g2)
[997]
Returns 1 or 0 to indicate whether the Minimum Bounding Rectangle of
g1
is within the Minimum
Bounding Rectangle of
g2
. This tests the opposite relationship as
MBRContains()
[996]
.
mysql>
SET @g1 = GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
mysql>
SET @g2 = GeomFromText('Polygon((0 0,0 5,5 5,5 0,0 0))');
mysql>
SELECT MBRWithin(@g1,@g2), MBRWithin(@g2,@g1);
+--------------------+--------------------+
| MBRWithin(@g1,@g2) | MBRWithin(@g2,@g1) |
+--------------------+--------------------+
| 1 | 0 |
+--------------------+--------------------+
12.16.5.4.2. Functions That Test Spatial Relationships Between Geometries
The OpenGIS specification defines the following functions. They test the relationship between two
geometry values
g1
and
g2
.
The return values 1 and 0 indicate true and false, respectively.
Note
Currently, MySQL does not implement these functions according to the
specification. Those that are implemented return the same result as the
corresponding MBR-based functions.
•
Contains(g1,g2)
[997]
Returns 1 or 0 to indicate whether
g1
completely contains
g2
. This tests the opposite relationship as
Within()
[998]
.
•
Crosses(g1,g2)
[997]
Returns 1 if
g1
spatially crosses
g2
. Returns
NULL
if
g1
is a
Polygon
or a
MultiPolygon
, or if
g2
is a
Point
or a
MultiPoint
. Otherwise, returns 0.
The term spatially crosses denotes a spatial relation between two given geometries that has the
following properties:
• The two geometries intersect
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...