db2se create_cs command

The db2se create_cs command creates a coordinate system.

This command stores information in the database about a new coordinate system. The information about the coordinate system is available through the DB2GSE.ST_COORDINATE_SYSTEMS catalog view.

Authorization

The user ID must have DBADM and DATAACCESS authority on the spatially enabled database to run this command.

Command syntax

db2se create_cs command

Read syntax diagramSkip visual syntax diagramcreate_csdatabase_name-userIduser_id-pwpassword -coordsysNamecoordsys_name-definitiondef_string-organizationorg_string-organizationCoordsysIdorg_cs_id-descriptiondescription_string

Command parameters

Where:
database_name
The name of the database for which you want to create the coordinate system.
-userId user_id
The database user ID that has DATAACCESS authority on the database indicated by database_name.
-pw password
The password for user_id.
-coordsysName coordsys_name
Uniquely identifies the coordinate system. The maximum length for this parameter is 128.

The coordsys_name value is converted to uppercase unless you enclose it in double quotation marks.

-definition def_string
Defines the coordinate system. The vendor that supplies the coordinate system usually provides the information for this parameter. The maximum length for this parameter is 2048.
-organization org_string
Defines the name of the organization that defined the coordinate system and provided the definition for it; for example, "European Petroleum Survey Group (EPSG)."

The combination of the org_string and org_cs_id uniquely identifies the coordinate system. The maximum length for this parameter is 128.

-organizationCoordsysId org_cs_id
Specifies a numeric identifier. The entity that is specified in org_string assigns this value. This value is not necessarily unique across all coordinate systems.

The combination of the org_string and org_cs_id uniquely identifies the coordinate system.

-description description_string
Describes the coordinate system by explaining its application. The maximum length for this parameter is 256.

Usage notes

Db2® Spatial Extender provides over 4000 coordinate systems. Creating a coordinate system is rarely necessary. Also, you must create a spatial reference system based on the new coordinate system.

Examples

The following example creates a coordinate system named MYCOORDSYS.

db2se create_cs mydb -coordsysName mycoordsys 
                     -definition GEOCS[\"GCS_NORTH_AMERICAN_1983\", 
                                 DATUM["D_North_American_1983\",
                                 SPHEROID[\"GRS_1980\",6387137,298.257222101]],
                                 PRIMEM[\"Greenwich\",0],
                                 UNIT["Degree\", 0.0174532925199432955]]