ST_EqualCoordsys function
The ST_EqualCoordsys function takes two coordinate system definitions as input parameters and returns the integer value 1 (one) if the specified definitions are identical. Otherwise, the integer value 0 (zero) is returned.
The coordinate system definitions are compared regardless of differences in spaces, parenthesis, uppercase and lowercase characters, and the representation of floating point numbers.
If any of the specified coordinate system definitions is null, null is returned.
Syntax
Parameter
- coordinate_system1
- A value of type VARCHAR(2048) that defines the first coordinate system to be compared with coordinate_system2.
- coordinate_system2
- A value of type VARCHAR(2048) that defines the second coordinate system to be compared with coordinate_system1.
Return type
INTEGER
Example
This example compares two Australian
coordinate systems to see if they are the same.
VALUES ST_EqualCoordSys(
(SELECT definition
FROM sysgeo.ST_COORDINATE_SYSTEMS
WHERE coordsys_name='GCS_AUSTRALIAN') ,
(SELECT definition
FROM sysgeo.ST_COORDINATE_SYSTEMS
WHERE coordsys_name='GCS_AUSTRALIAN_1984')
)
Results:
1
-----------
0