ST_SRID

Definition

ST_SRID takes an ST_Geometry object and returns its spatial reference ID.

Syntax

sde.st_srid (g1 sde.st_geometry)

Return type

Integer

Examples

The following table is created:

CREATE TABLE srid_test (g1 sde.st_geometry);

In the next statement, a point geometry located at coordinate (10.01, 50.76) is inserted into the geometry column g1. When the point geometry is created, it is assigned the SRID value of 4326.

Oracle

INSERT INTO SRID_TEST VALUES (
sde.st_geometry ('point (10.01 50.76)', 4326)
);

PostgreSQL

INSERT INTO srid_test VALUES (
sde.st_point ('point (10.01 50.76)', 4326)
);

The ST_SRID function returns the spatial reference ID of the geometry just entered.

Oracle

SELECT sde.st_srid (g1) SRID_G1
FROM SRID_TEST;

SRID_G1

4326

PostgreSQL

SELECT sde.st_srid (g1) 
AS SRID_G1
FROM srid_test;

srid_g1

4326
6/19/2015