CREATE SPATIAL REFERENCE SYSTEM Statement

Creates or replaces a spatial reference system.

Quick Links:

Go to Parameters

Go to Examples

Go to Usage

Go to Standards

Go to Permissions

Syntax

{ CREATE [ OR REPLACE ] SPATIAL REFERENCE SYSTEM 
    | CREATE SPATIAL REFERENCE SYSTEM IF NOT EXISTS } 
    srs-name 
    [ srs-attribute ] [ srs-attribute ... ]

srs-attribute - (back to Syntax)
    SRID srs-id
    | DEFINITION { definition-string | NULL }
    | ORGANIZATION { organization-name IDENTIFIED BY organization-srs-id | NULL } 
    | TRANSFORM DEFINITION { transform-definition-string | NULL } 
    | LINEAR UNIT OF MEASURE linear-unit-name 
    | ANGULAR UNIT OF MEASURE { angular-unit-name | NULL } 
    | TYPE { ROUND EARTH | PLANAR } 
    | COORDINATE coordinate-name { UNBOUNDED | BETWEEN low-number AND high-number } 
    | ELLIPSOID SEMI MAJOR AXIS semi-major-axis-length { SEMI MINOR AXIS semi-minor-axis-length 
    | INVERSE FLATTENING inverse-flattening-ratio } 
    | TOLERANCE { tolerance-distance | DEFAULT }
    | SNAP TO GRID { grid-size | DEFAULT } 
    | AXIS ORDER axis-order
    | POLYGON FORMAT polygon-format 
    | STORAGE FORMAT storage-format

grid-size - (back to srs-attribute)
   DOUBLE : usually between 0 and 1

axis-order - (back to srs-attribute)
   { 'x/y/z/m' | 'long/lat/z/m' | 'lat/long/z/m' }

polygon-format - (back to srs-attribute)
   { 'CounterClockWise' | 'Clockwise' | 'EvenOdd' }

storage-format - (back to srs-attribute)
   { 'Internal' | 'Original' | 'Mixed' }

Parameters

(back to top)

Examples

(back to top)

Usage

(back to top)

For a geographic spatial reference system, you can specify both a LINEAR and an ANGULAR unit of measure; otherwise for non-geographic, you specify only a LINEAR unit of measure. The LINEAR unit of measure is used for computing distance between points and areas. The ANGULAR unit of measure tells how the angular latitude/longitude are interpreted and is NULL for projected coordinate systems, non-NULL for geographic coordinate systems.

All derived geometries returned by operations are normalized.

When working with data that is being synchronized with a non-SQL Anywhere database, STORAGE FORMAT should be set to either 'Original' or 'Mixed' so that the original characteristics of the data can be preserved.

Standards

(back to top)

ANSI SQL–Compliance level: Transact-SQL® extension.

Permissions

(back to top)

Requires one of: