ST_EqualSRS function
The ST_EqualSRS function takes two spatial reference system identifiers as input parameters and returns 1 if the given spatial reference systems are identical. Otherwise, 0 (zero) is returned. The offsets, scale factors, and the coordinate systems are compared.
If any of the given spatial reference system identifiers is null, null is returned.
Syntax
Parameter
- srs_id1
- A value of type INTEGER that identifies the first spatial reference system to be compared with the spatial reference system identified by srs_id2.
- srs_id2
- A value of type INTEGER that identifies the second spatial reference system to be compared with the spatial reference system identified by srs_id1.
Return type
INTEGER
Example
Two similar spatial reference systems
are created with the following calls to db2se.
db2se create_srs SAMP_DB -srsId 12 -srsName NYE_12 -xOffset 0 -yOffset 0
-xScale 1 -yScale 1 -coordsysName
NAD_1983_StatePlane_New_York_East_FIPS_3101_Feet
db2se create_srs SAMP_DB -srsId 22 -srsName NYE_22 -xOffset 0 -yOffset 0
-xScale 1 -yScale 1 -coordsysName
NAD_1983_StatePlane_New_York_East_FIPS_3101_Feet
These SRSs have the same offset and scale values,
and they refer to the same coordinate systems. The only difference
is in the defined name and the SRS ID. Therefore, the comparison returns
1, which indicates that they are the same.
SET CURRENT FUNCTION PATH = CURRENT FUNCTION PATH, db2gse
VALUES ST_EqualSRS(12, 22)
Results:
1
-----------
1