ArcGIS Server Banner

ST_Equalsrs

ST_Equalsrs

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback

NOTE: Spatial type for PostgreSQL only

Definition

ST_Equalsrs checks to find if two spatial reference systems of two different feature classes are identical or not. 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

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 if the SRIDs represent the same spatial reference system or not.

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


srid table_name
2 streets
6 transmains

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

SELECT st_equalsrs(2,6) ;

 st_equalsrs

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

          0

(1 row)

See Also

  • An overview of SQL functions used with ST_Geometry types