ST_SetSrid

更新时间:
复制 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, two conditions must be met before the update takes effect:

  • The raster object must be georeferenced.

  • The specified SRID must exist in the spatial_ref_sys table.

If either condition is not met, the raster object cannot be updated.

Example

update rast set rast=ST_SetSrid(rast,4326) where id=1;
__________________________________
(1 row)