Топ-100
 

MBRCOVEREDBY

RDBMS Type: MySQL
Topic

MBRCoveredBy(g1, g2)

Returns 1 or 0 to indicate whether the minimum bounding rectangle of g1
is covered by the minimum bounding rectangle of g2. This tests the
opposite relationship as MBRCovers().

MBRCoveredBy() handles its arguments as described in the introduction
to this section.

URL: https://dev.mysql.com/doc/refman/8.0/en/spatial-relation-functions-mbr.html

Example

mysql> SET @g1 = ST_GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0))');
mysql> SET @g2 = ST_GeomFromText('Point(1 1)');
mysql> SELECT MBRCovers(@g1,@g2), MBRCoveredby(@g1,@g2);
+--------------------+-----------------------+
| MBRCovers(@g1,@g2) | MBRCoveredby(@g1,@g2) |
+--------------------+-----------------------+
| 1 | 0 |
+--------------------+-----------------------+
mysql> SELECT MBRCovers(@g2,@g1), MBRCoveredby(@g2,@g1);
+--------------------+-----------------------+
| MBRCovers(@g2,@g1) | MBRCoveredby(@g2,@g1) |
+--------------------+-----------------------+
| 0 | 1 |
+--------------------+-----------------------+