MBREqual(g1,g2)
Returns 1 or 0 to indicate whether the Minimum Bounding Rectangles of the two geometries g1 and g2 are the same.
SET @g1=GEOMFROMTEXT('LINESTRING(0 0, 1 2)'); SET @g2=GEOMFROMTEXT('POLYGON((0 0, 0 2, 1 2, 1 0, 0 0))'); SELECT MbrEqual(@g1,@g2); +-------------------+ | MbrEqual(@g1,@g2) | +-------------------+ | 1 | +-------------------+ SET @g1=GEOMFROMTEXT('LINESTRING(0 0, 1 3)'); SET @g2=GEOMFROMTEXT('POLYGON((0 0, 0 2, 1 4, 1 0, 0 0))'); SELECT MbrEqual(@g1,@g2); +-------------------+ | MbrEqual(@g1,@g2) | +-------------------+ | 0 | +-------------------+
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/mbrequal/