MBRIntersects

TL;DR

MBRIntersects returns whether two geometry minimum bounding rectangles intersect.

Syntax

MBRIntersects(geom1, geom2)

Arguments

geom1 and geom2 are GEOMETRY values.

Return Value

Returns BOOL.

Usage Notes

This is an MBR filter predicate; it does not test the detailed geometry relationship.

Examples

DROP DATABASE IF EXISTS geo_mbrintersects_demo;
CREATE DATABASE geo_mbrintersects_demo;
USE geo_mbrintersects_demo;

SELECT MBRIntersects(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 intersects_mbr;

DROP DATABASE geo_mbrintersects_demo;

See Also

MBRDisjoint, MBROverlaps, ST_Intersects