22.24 SDO_CS.INSERT_SRID

Format

SDO_CS.INSERT_SRID(
    srid                   IN NUMBER,
    coord_ref_sys_name     IN VARCHAR2,
    coord_ref_sys_kind     IN VARCHAR2,
    coord_sys_id           IN NUMBER,
    datum_id               IN NUMBER,
    source_geog_srid       IN NUMBER,
    projection_conv_id     IN NUMBER,
    cmpd_horiz_srid        IN NUMBER,
    cmpd_vert_srid         IN NUMBER,
    information_source     IN VARCHAR2,
    data_source            IN VARCHAR2,
    is_legacy              IN VARCHAR2,
    legacy_code            IN NUMBER,
    legacy_wktext          IN VARCHAR2,
    legacy_cs_bounds       IN MDSYS.SDO_GEOMETRY,
    or_replace             IN NUMBER DEFAULT 0);

Description

Inserts an SRID value for a coordinate reference system in MDSYS tables.

Parameters

srid

The ID of the coordinate reference system, such as in the tables CS_SRS and SDO_COORD_REF_SYS.

coord_ref_sys_name

The name of the coordinate reference system, such as in the table SDO_COORD_REF_SYS.

coord_ref_sys_kind

The type of the coordinate reference system, such as in the table SDO_COORD_REF_SYS.

coord_sys_id

The ID of the underlying coordinate system, such as in the table SDO_COORD_REF_SYS.

datum_id

The ID of the underlying datum, such as in the table SDO_COORD_REF_SYS.

source_geog_srid

The ID of the underlying geodetic SRID, such as in the table SDO_COORD_REF_SYS. This only applies to projected SRIDs.

projection_conv_id

The ID of the underlying projection operation, such as in the table SDO_COORD_REF_SYS. This only applies to projected SRIDs.

cmpd_horiz_srid

The ID of the underlying horizontal SRID, such as in the table SDO_COORD_REF_SYS. This only applies to compound SRIDs.

cmpd_vert_srid

The ID of the underlying vertical SRID, such as in the table SDO_COORD_REF_SYS. This only applies to compound SRIDs.

information_source

Provider of the definition for the coordinate system.

data_source

Organization that supplied the data for this record.

is_legacy

‘TRUE’ for OGC definitions based on WKT; ‘FALSE’ for EPSG definitions.

legacy_code

Optional code for an OGC definition that would be the equivalent for this EPSG definition.

legacy_wktext

OGC WKT, if this is an OGC definition.

legacy_cs_bounds

Optional boundaries of applicability of the coordinate reference system.

or_replace

The supported values are:

  • 1: Implies create or replace the SRID
  • 0: Implies create or raise exception if SRID already exists

Usage Notes

The procedure SDO_CS.INSERT_SRID is an alternative to directly inserting coordinate reference system definitions into tables. This can be more convenient, in general, because you need not verify whether the definition already exists (optional OR_REPLACE). Also, it can be important on platforms such as Autonomous Database, where the ADMIN user cannot otherwise directly insert definitions in certain MDSYS tables.

Examples

The following example inserts an SRID, 5007899, for a projected coordinate system.

SQL> call
  2    mdsys.sdo_cs.insert_srid(
  3      srid               => 5007899,
  4      coord_ref_sys_name => 'GDA2020 / Vicgrid',
  5      coord_ref_sys_kind => 'PROJECTED',
  6      coord_sys_id       => 4400,
  7      datum_id           => NULL,
  8      source_geog_srid   => 7844,
  9      projection_conv_id => 5017361,
 10      cmpd_horiz_srid    => null,
 11      cmpd_vert_srid     => null,
 12      information_source => 'Office of Surveyor-General Victoria',
 13      data_source        => 'EPSG',
 14      is_legacy          => 'FALSE',
 15      legacy_code        => NULL,
 16      legacy_wktext      => NULL,
 17      legacy_cs_bounds   => NULL);

Call completed.