All Products
Search
Document Center

PolarDB:ST_SetSkew

Last Updated:Mar 28, 2026

Sets the skew of a raster object along the X axis, the Y axis, or both axes 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

ParameterTypeDescription
raster_objrasterThe raster object.
skewXfloat8The skew along the X axis.
skewYfloat8The skew along the Y axis.
skewXYfloat8The skew along both the X and Y axes. Both axes are set to the same value.

Examples

Set skewX to 0.3 and skewY to 0.6 for the record where id = 2, then verify the result:

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

SELECT st_skewx(rast), st_skewy(rast)
FROM raster_table
WHERE id = 2;

Expected output:

 st_skewx | st_skewy
----------+---------
      0.3 |      0.6