Details
Description
Quoting Holyfoot's email:
Related tasks in JIRA are:
MDEV4045
Closed
Missing OGC Spatial functions.
MDEV60
Closed
Support for Spatial Reference systems for the GIS data.
MDEV12
Closed
OpenGIS: create required tables: GeometryColumns, related views.
Speaking shortly, the MariaDB GIS part is now OpenGIS compliant, and passes all the OpenGIS conformance tests
To get that the next things were done:
Missing functions were added:
IsRing(ln)
MDEV7510
Closed
The return type is Integer, with a return value of 1 for
TRUE, 0 for FALSE, and â€“1 for UNKNOWN
corresponding to a function invocation on NULL arguments;
return TRUE if c is a ring, i.e., if c is closed and simple. A
simple Curve does not pass through the same Point more than once.
PointOnSurface(s)
MDEV7514
Closed
The return type is POINT, returns a Point guaranteed to lie on the Surface.
arguments: POLYGON or MYLTIPOLYGON.
NumInteriorRings(p)
MDEV7525
Closed
The return type is Integer, returns the number of interiorRings
arguments: POLYGON.
Relate(g1 Geometry, g2 Geometry, patternMatrix String)
MDEV7529
Closed
The return type is Integer, with a return value of 1 for TRUE, 0 for
FALSE, and â€“1 for UNKNOWN corresponding to a function invocation on NULL arguments;
returns TRUE if the spatial relationship specified by the pattern Matrix holds.
ConvexHull(g1 Geometry)
The return is Geometry, returna a geometric object that is the convex hull of g1
arguments: GEOMETRY.
The information about the GEOMETRY column's reference system (SRID) is now stored in the
field's metadata. Syntax of the CREATE and ALTER was modified to specify the SRID
for the geometry columns.
With this information some views required by OpenGIS, were added:
GEOMETRY_COLUMNS, SPATIAL_REF_SYS:
These are links to the INFORMATION_SCHEMA.GEOMETRY_COLUMNS and
INFORMATION_SCHEMA.SPATIAL_REF_SYS respectively.
INFORMATION_SCHEMA.GEOMETRY_COLUMNS:
describes the available feature tables and their Geometry properties.
Fields:
F_TABLE_CATALOG CHARACTER VARYING(256) NOT NULL, F_TABLE_SCHEMA CHARACTER VARYING(256) NOT NULL, F_TABLE_NAME CHARACTER VARYING(256) NOT NULL, the above 3 fields are the fully qualified name of the feature table containing the geometry column; F_GEOMETRY_COLUMN CHARACTER VARYING(256) NOT NULL, the name of the column in the feature table that is the Geometry Column. G_TABLE_CATALOG CHARACTER VARYING(256) NOT NULL, G_TABLE_SCHEMA CHARACTER VARYING(256) NOT NULL, G_TABLE_NAME CHARACTER VARYING(256) NOT NULL, the above 3 fields are the name of the geometry table and its schema and catalog. The geometry table implements the geometry column; STORAGE_TYPE INTEGER, always 1 in MariaDB (means binary geometry implementation) GEOMETRY_TYPE INTEGER, the type of geometry values stored in this column. 0 = GEOMETRY 1 = POINT 3 = LINESTRING 5 = POLYGON 7 = MULTIPOINT 9 = MULTILINESTRING 11 = MULTIPOLYGON COORD_DIMENSION INTEGER, the number of dimensions in the spatial reference system. Always 2 in MariaDB. MAX_PPR INTEGER, Always 0 in MariaDB. SRID INTEGER the ID 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.
INFORMATION_SCHEMA.SPATIAL_REF_SYS:
stores information on each spatial reference system used in the database.
Fields:
SRID INTEGER NOT NULL PRIMARY KEY, an integer value that uniquely identifies each Spatial Reference System within a database. AUTH_NAME CHARACTER VARYING(256), the name of the standard or standards body that is being cited for this reference system. In most cases the value is "EPSG". AUTH_SRID INTEGER TEXT the Wellknown Text Representation of the Spatial Reference System.
Required stored procedures added:
AddGeometryColumn(FEATURE_TABLE_CATALOG, FEATURE_TABLE_SCHEMA,FEATURE_TABLE_NAME, GEOMETRY_COLUMN_NAME, SRID)
MDEV7515
Closed
adds new column of spatial type to the specified table
DropGeometryColumn(FEATURE_TABLE_CATALOG, FEATURE_TABLE_SCHEMA,FEATURE_TABLE_NAME, GEOMETRY_COLUMN_NAME)
MDEV7515
Closed
removes the spatial column from the table.
Attachments
Issue links
 relates to

MDEV7510 GIS: IsRing returns false for a primitive triangle
 Closed

MDEV7514 GIS: PointOnSurface returns NULL instead of the point
 Closed

MDEV7515 GIS: No AddGeometryColumn or DropGeometryColumn in the tree
 Closed

MDEV7926 Server crashes in get_geometry_column_record on concurrent SELECT FROM I_S.GEOMETRY_COLUMNS with join and DDL
 Closed

MDEV7525 GIS: ST_NumInteriorRings returns 1 on a polygon consisting of two separate parts
 Closed

MDEV7528 GIS: Functions return NULL instead of specified 1 for NULL arguments
 Closed

MDEV7529 GIS: ST_Relate returns unexpected results for POINT relations
 Closed

MDEV7925 Inconsistent behavior of ST_Touches with a POINT as one of arguments
 Closed

MDEV8675 Different results of GIS functions on NULL vs NOT NULL columns
 Closed

MDEV12 OpenGIS: create required tables: GeometryColumns, related views.
 Closed

MDEV60 Support for Spatial Reference systems for the GIS data
 Closed

MDEV4045 Missing OGC Spatial functions
 Closed
 links to