MBRCoveredBy

TL;DR

MBRCoveredBy returns whether the first geometry’s minimum bounding rectangle is covered by the second’s.

Syntax

MBRCoveredBy(geom1, geom2)

Arguments

geom1 and geom2 are GEOMETRY values.

Return Value

Returns BOOL.

Usage Notes

This is the inverse operand order of MBRCovers. It evaluates bounding rectangles only.

Examples

DROP DATABASE IF EXISTS geo_mbrcoveredby_demo;
CREATE DATABASE geo_mbrcoveredby_demo;
USE geo_mbrcoveredby_demo;

SELECT MBRCoveredBy(ST_GeomFromText('POLYGON((2 2,4 2,4 4,2 4,2 2))'), ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0))')) AS covered_by_mbr;

DROP DATABASE geo_mbrcoveredby_demo;

See Also

MBRCovers, MBRWithin, ST_CoveredBy