Team LiB
Previous Section Next Section

Spatial Types

These types are used to represent spatial or geometric values. In MySQL, values can be represented in Well-Known Text, Well-Known Binary, or internal spatial format. The spatial data types are used for storing internal-format values.

The spatial data types can be used only in MyISAM tables. They are available only if the server has been compiled with support for them, as indicated by the value of the have_geometry system variable.

For all spatial types, the allowable attributes are NULL and NOT NULL.

  • GEOMETRY

    Meaning. A geometry object. This type can hold a single value of any spatial type.

  • GEOMETRYCOLLECTION

    Meaning. A collection of one or more geometry objects (values of any spatial type).

  • LINESTRING

    Meaning. A curve, represented as a set of one or more POINT values.

  • MULTILINESTRING

    Meaning. A collection of one or more LINESTRING values.

  • MULTIPOINT

    Meaning. A collection of one or more POINT values.

  • MULTIPOLYGON

    Meaning. A collection of one or more POLYGON values.

  • POINT

    Meaning. A point (a pair of X/Y coordinates).

  • POLYGON

    Meaning. A polygon, represented as a set of one or more simple, closed LINESTRING values.

    Team LiB
    Previous Section Next Section