Feature Representation
Features read from DB2 Spatial consist of a series of attribute values and geometry. The feature type of each Database feature is as defined on its DEF line.
Features written to the database have the destination table as their feature type, and attributes as defined by on the DEF line.
In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Attributes), the DB2 Spatial module adds the format-specific attributes described below:
Attribute Name |
Contents |
db2_type |
The type of geometric entity stored within the feature. The valid values for the object model are listed below: db2_nil db2_point db2_linestring db2_polygon |
Features read from, or written to, DB2 Spatial 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 not case-sensitive.
No Coordinates
Features with no coordinates are tagged with this value when reading or writing to or from db2 Spatial.
Points
All DB2 Spatial point and multipoint features are read as db2_point. The only difference being the geometry type of feature, which will be set to fme_aggregate if it is a multipoint and fme_point if it is a point.
Lines
All DB2 Spatial linestring and Multilinestring features are read as db2_line. The only difference is the geometry type of feature, which will be set to fme_aggregate if it is a multilinestring and fme_line if it is a linestring.
Polygons
All DB2 Spatial polygon and multipolygon features are read as db2_polygon. The only difference is the geometry type of feature, which will be set to fme_aggregate if it is a multipolygon and fme_polygon if it is a polygon. Polygon features include donut polygons with one or more holes.
Aggregates are written out as “multipolygon” geometry containing several polygonal elements, just as if the feature had been tagged with db2_multiline. Any non-polygonal elements contained in the aggregate are discarded.
The following table summarizes all of the db2_type values that are possible with DB2 Spatial geometry, and provides a description of each representation.
db2_type |
DB2 Spatial type |
Representation |
db2_nil |
Not applicable |
No geometry |
db2_point |
POINT |
Single point geometry. fme_geometry = fme_point fme_type = fme_point |
MULTIPOINT |
Aggregate containing one or more points. fme_geometry = fme_aggregate fme_type = fme_point |
|
db2_line |
LINESTRING |
Single line geometry. fme_geometry = fme_line fme_type = fme_line |
MULTILINESTRING |
An aggregate of linestrings. fme_geometry = fme_aggregate fme_type = fme_line |
|
db2_polygon |
POLYGON |
A single polygon or donut geometry. fme_geometry = fme_polygon or fme_donut fme_type = fme_polygon |
|
MULTIPOLYGON |
An aggregate of simple polygons or donut polygons. fme_geometry = fme_aggregate fme_type = fme_polygon |