All Products
Search
Document Center

PolarDB:ST_SetSkew

Last Updated:Mar 28, 2026

Sets the georeference X and Y skew of a raster object in the spatial reference system.

Syntax

raster ST_SetSkew(raster raster_obj, float8 skewX, float8 skewY)
raster ST_SetSkew(raster raster_obj, float8 skewXY)

Parameters

ParameterDescription
raster_objThe raster object to modify.
skewXThe skew along the X axis.
skewYThe skew along the Y axis.
skewXYThe skew applied equally to both the X and Y axes.

Examples

Example 1: Set different skew values for X and Y

UPDATE raster_table
SET rast = ST_SetSkew(rast, 0.3, 0.6)
WHERE id = 2;

SELECT ST_SkewX(rast) AS skewx, ST_SkewY(rast) AS skewy
FROM raster_table
WHERE id = 2;

Output:

 skewx | skewy
-------+-------
   0.3 |   0.6

See also

  • ST_SkewX — Returns the X skew of a raster object.

  • ST_SkewY — Returns the Y skew of a raster object.