The IBM Informix Spatial DataBlade embeds a geographic information system (GIS) into the Informix Dynamic Server (IDS) kernel. The Informix Spatial DataBlade module implements the Open Geospatial Consortium, Inc. (OGC), SQL 3 specification of user-defined types (UDTs), columns capable of storing spatial data such as the location of a landmark, street, or parcel of land.
A geodatabase in an Informix database management system stores its spatial data in the Informix Spatial DataBlade data types. Therefore, before you can create a geodatabase in an Informix database, Spatial DataBlade must be registered.
For more information on Informix Spatial DataBlade and how to install it, consult IBM Informix Spatial DataBlade Module User's Guide. The DataBlade Module Installation and Registration Guide also describes how to register DataBlade modules.
How IBM Spatial DataBlade works
Once Informix Spatial DataBlade is installed, you can create spatially enabled tables that include spatial columns. These are called feature class in ArcGIS. Geographic features can be inserted into the spatial columns. Informix Spatial DataBlade converts spatial data into its storage format from one of three external formats:
- Well-known text (WKT) representation
- Well-known binary (WKB) representation
- Esri shape representation
Geodatabases in Informix databases use the Esri shape representation.
The spatial reference table
The spatial reference system identifies the coordinate transformation matrix for each geometry. Geometry is the term adopted by OGC to refer to two-dimensional spatial data. All spatial reference systems known to the database are stored in the spatial_references table. The spatial_references table stores a record for each spatial reference in the database.
Internal functions use the parameters of a spatial reference system to translate and scale each floating-point coordinate of the geometry into positive integers prior to storage. Upon retrieval, the coordinates are restored to their external floating-point format.
The floating point coordinates are converted to integers by subtracting the falsex and falsey values, which translates to the false origin, then scales by multiplying by the x,y units, adds a half unit, and truncates the remainder.
The optional z-coordinates and measures are dealt with similarly, except that they are translated with falsez and falsem and scaled with z-units and m-units, respectively.
SRID, the spatial_references primary key, contains a unique number for each spatial reference system.
The spatial reference system is assigned to a geometry during its construction. The spatial reference system must exist in the spatial_references table. All geometries in a column must have the same spatial reference system.
Whenever you create a feature class, ArcGIS searches the spatial_references table in an attempt to locate a matching spatial reference system. If one is found, the SRID is assigned to the feature class; otherwise, ArcGIS adds a new spatial reference system to the spatial_references table and assigns it to the feature class.
When you import data to a feature class from another data source, such as a coverage or shapefile, the coordinates of the data must fit within the extent of the spatial reference system. Each feature found to lie outside the spatial reference system's extent is rejected.
Feature classes in an Informix database
An Informix spatial table can include one or more spatial columns, but ArcGIS can only use one spatial column in a feature class. Spatial columns are defined with one of Informix Spatial DataBlade's UDTs. A spatial column can only accept data of the type required by the spatial column. For example, an ST_Polygon column rejects integers, characters, and even other types of nonpolygon geometry.
When ArcGIS creates a feature class in Informix, it also creates an Object ID column. The Object ID is an integer, non-null, unique column that is required by ArcGIS clients to keep track of selection sets.
ArcGIS also adds a record to the geometry_columns table whenever it creates a feature class in a geodatabase in Informix. Applications using the Informix Spatial DataBlade are responsible for inserting a record into the geometry_columns table each time they add a spatial column to the database.
Guidelines to use existing Informix tables with ArcGIS
Applications other than ArcGIS can create tables with spatial columns in Informix. ArcGIS has been designed to use tables containing spatial columns that were created by other applications or using SQL (sometimes referred to as third-party tables) as long as the tables meet certain prerequisites, including the following:
- The table must have an integer, non-null, unique column maintained by the database to use as an Object ID column.
- The table cannot contain columns of a user-defined type, other than an ST_Geometry column.
- The table can contain only one ST_Geometry column. If you want to access data in a table that contains more than one ST_Geometry column, create a view of the table that includes only one ST_Geometry column.
- The table must have only one spatial reference ID for all the records in the table.
- If you want to register the table with the geodatabase, you must be the table owner. When the table is registered with the geodatabase, ArcGIS adds its own Object ID column and maintains the values in the column.