22.16 SDO_CS.FIND_SRID
Format
SDO_CS.FIND_SRID( srid OUT NUMBER, epsg_srid_geog IN NUMBER DEFAULT NULL, epsg_srid_proj IN NUMBER DEFAULT NULL, datum_id IN NUMBER DEFAULT NULL, pm_id IN NUMBER DEFAULT NULL, proj_method_id IN NUMBER DEFAULT NULL, coord_ref_sys_kind IN VARCHAR2 DEFAULT NULL, semi_major_axis IN NUMBER DEFAULT NULL, semi_minor_axis IN NUMBER DEFAULT NULL, inv_flattening IN NUMBER DEFAULT NULL, params IN EPSG_PARAMS DEFAULT NULL);
or
SDO_CS.FIND_SRID( srid OUT NUMBER, epsg_srid_geog IN NUMBER DEFAULT NULL, epsg_srid_proj IN NUMBER DEFAULT NULL, datum_id IN NUMBER DEFAULT NULL, pm_id IN NUMBER DEFAULT NULL, proj_method_id IN NUMBER DEFAULT NULL, proj_op_id IN NUMBER DEFAULT NULL, coord_ref_sys_kind IN VARCHAR2 DEFAULT NULL, semi_major_axis IN NUMBER DEFAULT NULL, semi_minor_axis IN NUMBER DEFAULT NULL, inv_flattening IN NUMBER DEFAULT NULL, params IN EPSG_PARAMS DEFAULT NULL, max_rel_num_difference IN NUMBER DEFAULT 0.000001);
Description
Finds an SRID value for a coordinate system that matches information that you specify.
Parameters
- srid
-
Output parameter; will contain either a numeric SRID value or a null value, as explained in the Usage Notes.
- epsg_srid_geog
-
EPGS SRID value of a geographic coordinate system. Depending on the value of the
coord_ref_sys_kind
parameter, this procedure will either verify the existence of a coordinate system with this geographic SRID value, or will find an SRID value of a projected coordinate system based on a coordinate system with this SRID value. - epsg_srid_proj
-
EPGS SRID value of a projected coordinate system.
- datum_id
-
Datum ID value. Depending on the value of the
coord_ref_sys_kind
parameter, this procedure will look for the SRID of a geographic or projected coordinate system based on this datum. - ellipsoid_id
-
Ellipsoid ID value. Depending on the value of the
coord_ref_sys_kind
parameter, this procedure will look for the SRID of a geographic or projected coordinate system based on this ellipsoid. - pm_id
-
Prime meridian ID value. Depending on the value of the
coord_ref_sys_kind
parameter, this procedure will look for the SRID of a geographic or projected coordinate system based on this prime meridian. - proj_method_id
-
Projection method ID value. This procedure will look for the SRID of a projected coordinate system based on this projection method.
- proj_op_id
-
Projection operation ID value. This procedure will look for the SRID of a projected coordinate system based on this projection operation. A projection operation is a projection method combined with specific projection parameters.
- coord_ref_sys_kind
-
The kind or category of coordinate system. Must be a string value in the COORD_REF_SYS_KIND column of the SDO_COORD_REF_SYS table (described in SDO_COORD_REF_SYS Table). Examples:
GEOGRAPHIC2D
andPROJECTED
- semi_major_axis
-
Semi-major axis ID value. Depending on the value of the
coord_ref_sys_kind
parameter, this procedure will loo for the SRID of a geographic or projected coordinate system based on this semi-major axis. - semi_minor_axis
-
Semi-minor axis ID value. Depending on the value of the
coord_ref_sys_kind
parameter, this procedure will look for the SRID of a geographic or projected coordinate system based on this semi-minor axis. - inv_flattening
-
Inverse flattening (unit "unity"). Depending on the value of the
coord_ref_sys_kind
parameter, this procedure will look for the SRID of a geographic or projected coordinate system based on this inverse flattening. - params
-
Projection parameters. The parameters depend on the projection method. The EPSG_PARAMS type is defined as
VARRAY(1048576) OF EPSG_PARAM
, and the EPSG_PARAM type is defined as(id NUMBER, val NUMBER, uom NUMBER)
. The format includes attributes for the parameter ID, value, and unit of measure ID, as shown in the following example:epsg_params( epsg_param(8801, 0.0, 9102), epsg_param(8802, 9.0, 9102), epsg_param(8805, 0.9996, 9201), epsg_param(8806, 500000.0, 9001), epsg_param(8807, 0.0, 9001));
- max_rel_num_difference
-
A numeric value indicating how closely WKT values must match in order for a coordinate reference system to be considered a match. The default value is 0.000001. The value for each numeric WKT item is compared with its corresponding value in the WKT for the reference SRID or in the specified list of parameters to this procedure; and if the difference in all cases is less than or equal to the
max_rel_num_difference
value, the SRID for that coordinate reference system is included in the results.
Usage Notes
This procedure places the result of its operation in the srid
output parameter. The result is either a numeric SRID value or a null value.
This procedure has the following major uses:
-
To check if a coordinate system with a specific SRID value exists. In this case, you specify a value for
epsg_srid_geog
orepsg_srid_proj
(depending on whether the coordinate system is geographic or projected) and enough parameters for a valid PL/SQL statement. If the resultingsrid
parameter value is the same number as the value that you specified, the coordinate system with that SRID value exists; however, if the resultingsrid
parameter value is null, no coordinate system with that SRID value exists. -
To find the SRID value of a coordinate system based on information that you specify about it.
If multiple coordinate systems match the criteria specified in the input parameters, only one SRID value is returned in the srid
parameter. This could be any one of the potential matching SRID values, and it is not guaranteed to be the same value in subsequent executions of this procedure with the same input parameters.
Examples
The following example finds an SRID value for a projected coordinate system that uses datum ID 6267 in its definition.
DECLARE returned_srid NUMBER; BEGIN SDO_CS.FIND_SRID ( srid => returned_srid, epsg_srid_geog => null, epsg_srid_proj => null, datum_id => 6267, ellips_id => null, pm_id => null, proj_method_id => null, proj_op_id => null, coord_ref_sys_kind => 'PROJECTED'); DBMS_OUTPUT.PUT_LINE('SRID = ' || returned_srid); END; / SRID = 4267
Parent topic: SDO_CS Package (Coordinate System Transformation)