Migrating from Db2 Spatial Extender

When migrating geospatial data and applications from Db2 Spatial Extender to Spatial Analytics, there are important similarities and differences to consider.

Data migration

Before you migrate data from Db2 Spatial Extender to Spatial Analytics, consider the following points:
  • You will need to review the spatial reference systems in view DB2GSE.ST_SPATIAL_REFERENCE_SYSTEMS and re-create them using the procedure ST_CREATE_SRS. The predefined coordinate systems in SYSGEO.ST_COORDINATE_SYSTEMS match the coordinate systems in DB2GSE.ST_COORDINATE_SYSTEMS, and can be pulled into the SRS definition using the coordinate system name.
  • Spatial data can be migrated in either of the following ways:
    • By using a transport format such as WKT, WKB, GML, or SDE
    • By exporting the data as a shapefile and reimporting it, with the new data type, into a table on the server
  • Each of the SYSIBM.ST_GEOMETRY data types used by Spatial Analytics holds the same amount of data as the corresponding DB2GSE.ST_GEOMETRY data type used by Spatial Extender.

Functional and usage differences

Table 1. Schema names
Objects Spatial Extender Spatial Analytics
Data types DB2GSE SYSIBM
Catalog Tables/Views DB2GSE SYSGEO
Procedures DB2GSE SYSPROC
Note: When you use a default search path, the schemas sysibm and sysproc are searched first for matching names. If a database is enabled for both Spatial Analytics and Spatial Extender, specify the full name of the object to prevent mismatches.
Table 2. Data types
Objects Spatial Extender Spatial Analytics
Table organization By row By row or by column
Maximum size of a (compressed) geometry 4 MB 4 MB
Type
  • Structured
  • Supports function syntax:
    select db2gse.st_srsid(geo) from geotab
  • Supports method syntax:
    select geo..srsid from geotab
  • Simple
  • Supports function syntax:
    select st_srsid(geo) from geotab
Table 3. Spatial reference systems (SRSs)
Usage Spatial Extender Spatial Analytics
Coordinate systems SRSs define offset and scale factors for a defined coordinate system. Coordinate systems are maintained separately and changes automatically propagated to all SRSs that use the coordinate system. SRSs define offset and scale factors for a selected coordinate system. Changes to the coordinate system are made in the context of a specific SRS.
Default SRS identifier 0 = Undefined 4326 = GCS_WGS_1984
Table 4. Auxiliary features
Topic Spatial Extender Spatial Analytics
db2se command line Yes Yes1
Aggregation functions Yes No
1 Only the following commands can be issued:
  • export_shape
  • import_shape
  • shape_info
The -sa 1 parameter must also be specified.