Adding an SRID to Spatial

April 19, 2023

oracle, spatial

A Norwegian version of this post can be found here .

Add SRID 5973 to Oracle Spatial

Oracle Spatial comes with over 6000 coordinate systems, but SRID 5973 is currently missing. However this is easy to add with a few insert-statements.

Run this as user SYSTEM:

insert into sdo_datums (
DATUM_ID,
DATUM_NAME,
DATUM_TYPE,
ELLIPSOID_ID,
PRIME_MERIDIAN_ID,
INFORMATION_SOURCE,
DATA_SOURCE,
SHIFT_X,
SHIFT_Y,
SHIFT_Z,
ROTATE_X,
ROTATE_Y,
ROTATE_Z,
SCALE_ADJUST,
IS_LEGACY,
LEGACY_CODE)
values (
1096,
'Norway Normal Null 2000',
'VERTICAL',
null,
null,
'Norwegian Mapping Authority',
'OGP',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
'FALSE',
NULL);

INSERT INTO sdo_coord_ref_system (
    srid,
    coord_ref_sys_name,
    coord_ref_sys_kind,
    coord_sys_id,
    datum_id,
    geog_crs_datum_id,
    source_geog_srid,
    projection_conv_id,
    cmpd_horiz_srid,
    cmpd_vert_srid,
    information_source,
    data_source,
    is_legacy,
    legacy_code,
    legacy_wktext,
    legacy_cs_bounds,
    is_valid,
    supports_sdo_geometry
)
VALUES (
    '5941',
    'NN2000 height',
    'VERTICAL',
    '6499',
    '5206',
    '5206',
    NULL,
    NULL,
    NULL,
    NULL,
    'Norwegian Mapping Authority.',
    'EPSG',
    'FALSE',
    NULL,
    NULL,
    NULL,
    'TRUE',
    'TRUE'
);

INSERT INTO sdo_coord_ref_system (
    srid,
    coord_ref_sys_name,
    coord_ref_sys_kind,
    coord_sys_id,
    datum_id,
    geog_crs_datum_id,
    source_geog_srid,
    projection_conv_id,
    cmpd_horiz_srid,
    cmpd_vert_srid,
    information_source,
    data_source,
    is_legacy,
    legacy_code,
    legacy_wktext,
    legacy_cs_bounds,
    is_valid,
    supports_sdo_geometry
) VALUES (
    '5973',
    'ETRS89 / UTM zone 33N + NN2000 height',
    'COMPOUND',
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    '25833',
    '5941',
    'Norwegian Mapping Authority',
    'EPSG',
    'FALSE',
    NULL,
    NULL,
    NULL,
    'TRUE',
    'TRUE'
);

commit;