### 12.15.7 Spatial Operator Functions

OpenGIS proposes a number of functions that can produce
geometries. They are designed to implement spatial operators.

`Buffer(``g`

,`d`

)

Returns a geometry that represents all points whose distance
from the geometry value `g`

is less
than or equal to a distance of `d`

.

`Buffer()`

supports negative
distances for polygons, multipolygons, and geometry
collections containing polygons or multipolygons. For point,
multipoint, linestring, multilinestring, and geometry
collections not containing any polygons or multipolygons,
`Buffer()`

with a negative
distance returns `NULL`

.

Prior to MySQL 5.6.1, this function is unimplemented.

The OpenGIS specification also defines the following functions,
which MySQL does not implement:

`ConvexHull(``g`

)

Returns a geometry that represents the convex hull of the
geometry value `g`

.

`Difference(``g1`

,`g2`

)

Returns a geometry that represents the point set difference of
the geometry value `g1`

with
`g2`

.

`Intersection(``g1`

,`g2`

)

Returns a geometry that represents the point set intersection
of the geometry values `g1`

with
`g2`

.

`SymDifference(``g1`

,`g2`

)

Returns a geometry that represents the point set symmetric
difference of the geometry value `g1`

with `g2`

.

`Union(``g1`

,`g2`

)

Returns a geometry that represents the point set union of the
geometry values `g1`

and
`g2`

.

In addition, Section 12.15.6, “Geometry Property Functions”, discusses
several functions that construct new geometries from existing
ones. See that section for descriptions of these functions: