ST_SetSrid

Updated at:
Copy as MD

Sets the spatial reference system identifier (SRID) of a raster object. The SRID and its definition are stored in the spatial_ref_sys table.

Syntax

raster ST_SetSrid(raster rast, integer srid);

Parameters

ParameterDescription
rastThe raster object.
sridThe SRID to assign to the raster object.

Usage notes

For raster objects stored in external mode, make sure the object is georeferenced and the specified SRID exists in the spatial_ref_sys table. If either condition is not met, the raster object information cannot be updated.

Examples

UPDATE rast SET rast = ST_SetSrid(rast, 4326) WHERE id = 1;

Output:

(1 row)