MBRCovers

TL;DR

MBRCovers returns whether the first geometry’s minimum bounding rectangle covers the second’s.

Syntax

MBRCovers(geom1, geom2)

Arguments

geom1 and geom2 are GEOMETRY values.

Return Value

Returns BOOL.

Usage Notes

MBRCovers(a, b) has the same operand relationship as MBRCoveredBy(b, a). The comparison uses bounding rectangles only.

Examples

DROP DATABASE IF EXISTS geo_mbrcovers_demo;
CREATE DATABASE geo_mbrcovers_demo;
USE geo_mbrcovers_demo;

SELECT MBRCovers(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0))'), ST_GeomFromText('POLYGON((2 2,4 2,4 4,2 4,2 2))')) AS covers_mbr;

DROP DATABASE geo_mbrcovers_demo;

See Also

MBRCoveredBy, MBRContains, ST_Covers