15.10 - AddGeometryColumn Stored Procedure - Teradata Database

Teradata Database SQL Geospatial Types

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1181-151K

Add geometry metadata to the SYSSPATIAL.GEOMETRY_COLUMNS table for a new ST_Geometry column.

 

Parameter …

Specifies …

catalog_name

the name of the catalog.

The value can be an empty string ('') for Teradata.

schema_name

the name of the database in which the table specified by table_name is defined.

table_name

the name of the table that has a column defined as an ST_Geometry type.

geom_column_name

the name of the column in the table specified by table_name that is defined as an ST_Geometry type.

srid

the spatial reference system identifier used for the coordinate geometry in the table_name table.

geom_type

 

the geometry type that column specified by geom_column_name represents.

Valid values include:

  • 'ST_Geometry'
  • 'ST_Point'
  • 'ST_LineString'
  • 'ST_Polygon'
  • 'ST_GeometryCollection'
  • 'ST_MultiPoint'
  • 'ST_MultiLineString'
  • 'ST_MultiPolygon'
  • 'GeoSequence'
  • UxMin_v

    the lower left X coordinate of the MBR of the universe for all values in the new ST_Geometry column.

    UyMin_v

    the lower left Y coordinate of the MBR of the universe for all values in the new ST_Geometry column.

    UxMax_v

    the upper right X coordinate of the MBR of the universe for all values in the new ST_Geometry column.

    UyMax_v

    the upper right Y coordinate of the MBR of the universe for all values in the new ST_Geometry column.

    VARCHAR(1024)

    You can optionally use this stored procedure to add metadata to the GEOMETRY_COLUMNS table in the SYSSPATIAL database when you create a table that has a column defined as an ST_Geometry type.

    Stored procedures are invoked using the CALL statement. For more information, see SQL Data Manipulation Language

    CREATE TABLE lakes (
    fid INTEGER NOT NULL,
    name VARCHAR(64),
    shore ST_Geometry ) UNIQUE PRIMARY INDEX (fid);
     
    CALL SYSSPATIAL.AddGeometryColumn('','OpenGISU','lakes','shore',988,
          'ST_Polygon', 0.0, 1.0, 1000.0, 1001.0, s );
     
    resultString
    -----------------------------------------------------
    shore in table OpenGISU.lakes was successfully added.
     

    CREATE TABLE road_segments (
    fid INTEGER NOT NULL,
    name VARCHAR(64),
    centerline ST_Geometry ) UNIQUE PRIMARY INDEX (fid);
     
    CALL SYSSPATIAL.AddGeometryColumn( '', 'OpenGISU', 'road_segments',
          'centerline', 988, 'ST_LineString', 0E0, 1E0, 1E3, 1.001E3, s );
     
    resultString
    ------------------------------------------------------------------
    centerline in table OpenGISU.road_segments was successfully added.