IBM DB2/Db2 Warehouse on Cloud Spatial Reader/Writer

FME can read spatial and attribute data, and write spatial and attribute data to the IBM DB2 databases.

Before using this format, please note the following:

  • FME supports DB2 versions 9.5 to 10.5 (LUW) and version 11 (z/OS). Support has been deprecated for earlier versions, down to and including 7.2. FME has no support for DB2 versions below 7.2.
  • DB2 Spatial currently provides support for 2D geometries only. For 3D and 3D with Measures support, please contact Safe Software.
  • DB2 readers and writers support only uppercase schema, table, and column names.

Overview

FME’s DB2 Spatial Reader/Writer module (referred to as DB2 Spatial in this chapter) can read from, and write to tables in databases that are spatially enabled. This module communicates with DB2 using ODBC.

This section assumes familiarity with the IBM DB2 Spatial Extender, the geometry types it supports, and its indexing mechanisms.

Note  See the InlineQuerier, SQLCreator, and SQLExecutor transformers. These transformers allow arbitrary Structured Query Language (SQL) statements to be executed against any database.

Reader Overview

The DB2 Spatial reader retrieves table data through feature types. WHERE clauses are supported. A SELECT statement may also be used as a source of results.

A DB2 Spatial reader can read back one or more spatial tables.

Writer Overview

The DB2 Spatial writer module writes both geometry and attributes into DB2 Spatially enabled databases. The DB2 Spatial writer provides the following capabilities:

  • Table Creation and Truncation
  • Coordinate System: If the target coordinate system does not exist, the writer creates a coordinate system. To determine if a coordinate system exists, the writer uses the associated EPSG code, and failing that, the OGC WKT definition of the coordinate system. If the target table does not exist, the coordinate system on the first input feature will be the coordinate system of the spatial column specified. Once the target table exists, coordinate systems on input features are ignored.

  • Spatial Reference System: Uses an existing spatial reference system with matching parameters or create new one as required when registering the spatial column.
  • Spatial Grid Index Creation: Creates spatial indexes only if valid values are specified for the three different levels of grid index size.
  • Esri’s ArcExplorer 3.0 JDBC Edition: To view spatial data written by DB2 Spatial writer in ArcExplorer 3.0, each spatial table must have a column named SE_ROW_ID of type integer. It does not matter if the column is populated.
    Also note that ArcExplorer expects users to at least have execute privileges on certain functions in DB2GSE schema or have DBADM authority.

     Bulk Loading: The DB2 Spatial writer does not use a bulk loading technique .