Sets the georeference of a raster object by specifying its spatial reference system and affine transformation parameters.
Syntax
raster ST_SetGeoreference(raster rast, integer srid, integer aop, double A, double B, double C, double D, double E, double F)Parameters
| Parameter | Description |
|---|---|
| rast | The raster object. |
| srid | The spatial reference system identifier (SRID) of the raster object. |
| aop | The spatial reference point. Valid values: 1 (center cell), 2 (upper-left cell). |
| A, B, C, D, E, F | The six parameters of an affine transformation. The transformation maps pixel coordinates to geographic coordinates as follows: x = A × Column number + B × Row number + C; y = D × Column number + E × Row number + F |
Usage notes
If the raster object is stored in external mode, it must already be geographically referenced and the specified SRID must exist in the spatial_ref_sys table. If either condition is not met, the update fails.
Examples
update rast set rast=ST_SetGeoreference(rast,4326,1,8.4163,0,124,0,-8.4163,36.2) where id=1;Output:
(1 row)该文章对您有帮助吗?