Table of Contents
This section describes the datatypes you can use for representing spatial data in MySQL, and the functions available for creating and retrieving spatial values.
MySQL provides a set of datatypes that correspond to classes in the class hierarchy of the OpenGIS Geometry Model. Some of these types hold single geometry values:
GEOMETRY
POINT
LINESTRING
POLYGON
GEOMETRY is the most general of these single-value types; it can store geometry values of any type. The others restrict their values to a particular geometry type.
The other datatypes hold collections of values:
MULTIPOINT
MULTILINESTRING
MULTIPOLYGON
GEOMETRYCOLLECTION
GEOMETRYCOLLECTION can store a collection of objects of any type. The other collection types restrict collection members to those having a particular geometry type.