MariaDB (MySQL-compatible) Spatial Feature Representation

Features read from MySQL consist of a series of attribute values and geometry as defined in the Feature Type parameters.

The geometry object model in MySQL follows the OGIS Simple Features Specification 1.1. For more information see http://www.opengis.org.

Features written to the database have the destination table as their feature type, and attributes as defined in the Feature Type parameters.

Features read from, or written to, MySQL also have an attribute for each column in the database table. The feature attribute name will be the same as the source or destination column name. The attribute and column names are case-insensitive as opposed to database and table names whose case sensitivity depends on the underlying operating system.

No Coordinates

mysql_type: mysql_none

Features with no coordinates are tagged with this value when reading or writing to or from MySQL. Note also that this is not a valid OGIS Simple Features geometry type. These features have a dimension of -1.

Points

mysql_type: mysql_point

Features tagged with this value consist of a single point. Both singular points and aggregates of points are supported. Point aggregates will become multipoints while singular points will become points in MySQL. Points have a dimension of 0.

Line

mysql_type: mysql_lines

Linear features are tagged with this value when reading or writing to or from MySQL. A linestring consists of one or more ordered two-point line segments. Line aggregates will become multilinestrings while singular lines will become linestrings in MySQL. Linestrings have a dimension of 1.

Area

mysql_type: mysql_area

Area or polygon features are tagged with this value when reading or writing to or from MySQL. Both single-part and aggregate area features are supported. An area feature may be either a polygon or a donut polygon. Note that NO checking is done to ensure that the area features adhere to the geometry rules of MySQL as they are loaded. Area aggregates will become multipolygons while singular areas will become polygons in MySQL. Areas have a dimension of 2.

GeometryCollections

mysql_type: mysql_geometrycollection

Aggregates containing heterogeneous collections of point, line and polygon features are processed through FME as single features when reading or writing to or from MySQL. Thus by default no geometry_collections are produced.

When reading geometry collection features from MySQL, the features in the collection are split out into individual FME features and are tagged with the collection number and item number to identify their origin. This results in a less accurate representation of the geometry actually contained in the MySQL table, but greatly simplifies the processing of such data and its writing to several other formats. When writing back to MySQL, the mysql_type can be manually set to mysql_geometrycollection and they will be rewritten as collections.