Information Schema GEOMETRY_COLUMNS Table

MariaDB starting with 10.1.2

The GEOMETRY_COLUMNS table was introduced in MariaDB 10.1.2

Description

The Information Schema GEOMETRY_COLUMNS table provides support for Spatial Reference systems for GIS data.

It contains the following columns:

ColumnTypeNullDescription
F_TABLE_CATALOGVARCHAR(512)NOTogether with F_TABLE_SCHEMA and F_TABLE_NAME, the fully qualified name of the featured table containing the geometry column.
F_TABLE_SCHEMAVARCHAR(64)NOTogether with F_TABLE_CATALOG and F_TABLE_NAME, the fully qualified name of the featured table containing the geometry column.
F_TABLE_NAMEVARCHAR(64)NOTogether with F_TABLE_CATALOG and F_TABLE_SCHEMA, the fully qualified name of the featured table containing the geometry column.
F_GEOMETRY_COLUMNVARCHAR(64)NOName of the column in the featured table that is the geometry golumn.
G_TABLE_CATALOGVARCHAR(512)NO
G_TABLE_SCHEMAVARCHAR(64)NODatabase name of the table implementing the geometry column.
G_TABLE_NAMEVARCHAR(64)NOTable name that is implementing the geometry column.
G_GEOMETRY_COLUMNVARCHAR(64)NO
STORAGE_TYPETINYINT(2)NOBinary geometry implementation. Always 1 in MariaDB.
GEOMETRY_TYPEINT(7)NOInteger reflecting the type of geometry stored in this column (see table below).
COORD_DIMENSIONTINYINT(2)NONumber of dimensions in the spatial reference system. Always 2 in MariaDB.
MAX_PPRTINYINT(2)NOAlways 0 in MariaDB.
SRIDSMALLINT(5)NOID of the Spatial Reference System used for the coordinate geometry in this table. It is a foreign key reference to the SPATIAL_REF_SYS table.

Storage_type

The integers in the storage_type field match the geometry types as follows:

IntegerType
0GEOMETRY
1POINT
3LINESTRING
5POLYGON
7MULTIPOINT
9MULTILINESTRING
11MULTIPOLYGON

Example

CREATE TABLE g1(g GEOMETRY(9,4) REF_SYSTEM_ID=101);

SELECT * FROM information_schema.GEOMETRY_COLUMNS\G
*************************** 1. row ***************************
  F_TABLE_CATALOG: def
   F_TABLE_SCHEMA: test
     F_TABLE_NAME: g1
F_GEOMETRY_COLUMN: 
  G_TABLE_CATALOG: def
   G_TABLE_SCHEMA: test
     G_TABLE_NAME: g1
G_GEOMETRY_COLUMN: g
     STORAGE_TYPE: 1
    GEOMETRY_TYPE: 0
  COORD_DIMENSION: 2
          MAX_PPR: 0
             SRID: 101

See also

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.