22.2 SDO_CS.CONVERT_3D_SRID_TO_2D

Format

SDO_CS.CONVERT_3D_SRID_TO_2D(
     srid3d  IN NUMBER) RETURN NUMBER;

Description

Converts a three-dimensional SRID value into a two-dimensional SRID value.

Parameters

srid_3d

The SRID of a three-dimensional coordinate reference system. Must be a value in the SRID column of the SDO_COORD_REF_SYS table (described in SDO_COORD_REF_SYS Table).

Usage Notes

Note:

SDO_CS.CONVERT_3D_SRID_TO_2D function is not supported in Oracle Autonomous Database Serverless deployments.

This function returns the SRID value of a functionally equivalent two-dimensional coordinate reference system that corresponds to the input coordinate reference system.

  • If a compound 3D SRID is input, there is only one corresponding two-dimensional SRID, and it is returned.

  • If a Geographic 3D SRID is input, there may be multiple possible corresponding two-dimensional SRIDs, and one of them is returned.

  • If a two-dimensional SRID is input, it is returned.

For information about three-dimensional coordinate reference system support, see Three-Dimensional Coordinate Reference System Support.

Examples

The following example returns an equivalent two-dimensional SRID for each coordinate reference system listed in the SDO_COORD_REF_SYS table (described in SDO_COORD_REF_SYS Table). For 2D SRID values in that table, the function returns the existing value.

SELECT
    crs.srid "nD SRID",
    crs.coord_ref_sys_kind "nD Type",
    sdo_cs.convert_3d_srid_to_2d(crs.srid) "2D SRID",
    (SELECT
        coord_ref_sys_kind
      FROM
        sdo_coord_ref_sys crs2
      WHERE
        crs2.srid = sdo_cs.convert_3d_srid_to_2d(crs.srid)
    ) "2D Type"
  FROM sdo_coord_ref_sys crs
  ORDER BY crs.coord_ref_sys_kind,crs.srid;

   nD SRID nD Type                     2D SRID 2D Type
---------- ------------------------ ---------- ------------------------
      4097 COMPOUND                       4093 PROJECTED
      4098 COMPOUND                       4094 PROJECTED
      4099 COMPOUND                       4095 PROJECTED
      …    …                              …    …
      7400 COMPOUND                       4807 GEOGRAPHIC2D
      …    …                              …    …
      5800 ENGINEERING                    5800 ENGINEERING
      …    …                              …    …
      4000 GEOCENTRIC
      …    …                              …    …
      4326 GEOGRAPHIC2D                   4326 GEOGRAPHIC2D
      …    …                              …    …
      4327 GEOGRAPHIC3D                   4326 GEOGRAPHIC2D
      …    …                              …    …
     27700 PROJECTED                     27700 PROJECTED
      …    …                              …    …
      3855 VERTICAL                       3855 VERTICAL
      …    …                              …    …