- Categories:
ST_SETSRID¶
Returns a GEOMETRY object that has its SRID (spatial reference system identifier) set to the specified value.
Syntax¶
ST_SETSRID( <geometry_expression> , <srid> )
Arguments¶
geometry_expression
The argument must be an expression of type GEOMETRY.
srid
The SRID to set in the returned GEOMETRY object.
Returns¶
The function returns a value of type GEOMETRY.
Usage Notes¶
Examples¶
The following example creates and returns a GEOMETRY object that uses the SRID 4326:
ALTER SESSION SET GEOMETRY_OUTPUT_FORMAT='EWKT'; SELECT ST_SETSRID(TO_GEOMETRY('POINT(13 51)'), 4326); +-----------------------------------------------+ | ST_SETSRID(TO_GEOMETRY('POINT(13 51)'), 4326) | |-----------------------------------------------| | SRID=4326;POINT(13 51) | +-----------------------------------------------+