Spatial reference systems (SRS) and Spatial reference identifiers (SRID)

In the context of spatial databases, the defined space in which geometries are described is called a spatial reference system (SRS). A spatial reference system defines, at minimum:

Every spatial reference system has an identifier called a Spatial Reference Identifier (SRID). When SAP Sybase IQ performs operations like finding out if a geometry touches another geometry, it uses the SRID to look up the spatial reference system definition so that it can perform the calculations properly for that spatial reference system. In a SAP Sybase IQ database, each SRID must be unique.

By default, SAP Sybase IQ adds the following spatial reference systems to a new database:

Since you can define a spatial reference system however you want and can assign any SRID number, the spatial reference system definition (projection, coordinate system, and so on) must accompany the data as it moves between databases or is converted to other SRSs. For example, when you unload spatial data to WKT, the definition for the spatial reference system is included at the beginning of the file.

Installing additional spatial reference systems using the sa_install_feature system procedure

SAP Sybase IQ also provides thousands of predefined SRSs for use. However, these SRSs are not installed in the database by default when you create a new database. You use the sa_install_feature system procedure to add them.

You can find descriptions of these additional spatial reference systems at spatialreference.org and www.epsg-registry.org/.

Determining the list of spatial reference systems currently in the database

Spatial reference system information is stored in the ISYSSPATIALREFERENCESYSTEM system table. The SRIDs for the SRSs are used as primary key values in this table. The database server uses SRID values to look up the configuration information for a spatial reference system so that it can interpret the otherwise abstract spatial coordinates as real positions on the Earth.

You can find the list of spatial reference systems by querying the ST_SPATIAL_REFERENCE_SYSTEMS consolidated view. Each row in this view defines a spatial reference system.

Compatibility with popular mapping applications

Some popular web mapping and visualization applications such as Google Earth, Bing Maps, and ArcGIS Online, use a spatial reference system with a Mercator projection that is based on a spherical model of the Earth. This spherical model ignores the flattening at the Earth's poles and can lead to errors of up to 800m in position and up to 0.7 percent in scale, but it also allows applications to perform projections more efficiently.

In the past, commercial applications assigned SRID 900913 to this spatial reference system. However, EPSG has since released this projection as SRID 3857. For compatibility with applications requiring 900913, you can do the following:

  1. Use the sa_install_feature system procedure to install all of the spatial reference systems provided by SAP Sybase IQ (including SRID 3857).

  2. Perform dbunload -n to get the 3857 SRID definition (the dbunload utility is not provided with SAP Sybase IQ).