ST_Equalsrs

RemarqueRemarque :

ST_Geometry in PostgreSQL only

Definition

ST_Equalsrs checks to find whether two spatial reference systems of two different feature classes are identical. If the spatial reference systems are identical, t (true) is returned. If the spatial reference systems are not identical, ST_Equalsrs returns f (false).

Syntax

sde.st_equalsrs (srid1 integer, srid2 integer)

Return type

Integer

Example

In this example, the spatial reference IDs (SRID) of different feature classes are discovered, then ST_Equalsrs is used to see whether the SRIDs represent the same spatial reference system.

SELECT srid, table_name
FROM sde_layers
WHERE table_name = 'transmains' OR table_name = 'streets';

srid

table_name

2

streets

6

transmains

Results of sde_layers query

Now, use ST_Equalsrs to determine whether the spatial reference systems identified by these two SRIDs are the same.

SELECT sde.st_equalsrs(2,6) ;

 st_equalsrs

-------------

          0

(1 row)

2/28/2012