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

• ST_Overlaps( g1 , g2 ) 

Two geometries spatially overlap  if they intersect and their intersection results in a geometry of the same dimension but not equal to either of the given geometries. 

This function returns 1 or 0 to indicate whether g1  spatially overlaps g2 . 

ST_Overlaps()  handles its arguments as described in the introduction to this section except that the return value is NULL  for the additional condition that the dimensions of the two geometries are not equal. 

• ST_Touches( g1 , g2 ) 

Two geometries spatially touch  if their interiors do not intersect, but the boundary of one of the geometries intersects either the boundary or the interior of the other. 

This function returns 1 or 0 to indicate whether g1  spatially touches g2 . 

ST_Touches()  handles its arguments as described in the introduction to this section except that the return value is NULL  for the additional condition that both geometries are of dimension 0 ( Point  or MultiPoint ). 

• ST_Within( g1 , g2 ) 

Returns 1 or 0 to indicate whether g1  is spatially within g2 . This tests the opposite relationship as ST_Contains() . 

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

## 12.17.9.2 Spatial Relation Functions That Use Minimum Bounding Rectangles 

MySQL provides several MySQL-specific functions that test the relationship between minimum bounding rectangles (MBRs) of two geometries g1  and g2 . The return values 1 and 0 indicate true and false, respectively. 

The bounding box of a point is interpreted as a point that is both boundary and interior. 

The bounding box of a straight horizontal or vertical line is interpreted as a line where the interior of the line is also boundary. The endpoints are boundary points. 

If any of the parameters are geometry collections, the interior, boundary, and exterior of those parameters are those of the union of all elements in the collection. 

Functions in this section detect arguments in either Cartesian or geographic spatial reference systems (SRSs), and return results appropriate to the SRS. 

Unless otherwise specified, functions in this section handle their geometry arguments as follows: 

•If any argument is NULL  or an empty geometry, the return value is NULL . 

•If any geometry argument is not a syntactically well-formed geometry, an ER_GIS_INVALID_DATA  error occurs. 

•If any geometry argument is a syntactically well-formed geometry in an undefined spatial reference system (SRS), an ER_SRS_NOT_FOUND  error occurs. 

