ST_SetRotation — Bestimmt die Rotation des Rasters in Radiant.
raster ST_SetRotation(raster rast, float8 rotation);
Einheitliche Rotation des Rasters. Die Rotation wird in Radiant angegeben. Siehe World File für mehr Details.
WITH variants AS (
SELECT rid, 'rotated' AS kind, ST_SetRotation(rast, 15) AS rast
FROM dummy_rast
UNION ALL
SELECT rid, 'original', rast
FROM dummy_rast
)
SELECT
rid,
kind,
round(ST_ScaleX(rast)::numeric, 4) AS scale_x,
round(ST_ScaleY(rast)::numeric, 4) AS scale_y,
round(ST_SkewX(rast)::numeric, 4) AS skew_x,
round(ST_SkewY(rast)::numeric, 4) AS skew_y
FROM variants
ORDER BY rid, kind;
rid | kind | scale_x | scale_y | skew_x | skew_y -----+----------+---------+---------+--------+-------- 1 | original | 2.0000 | 3.0000 | 0.0000 | 0.0000 1 | rotated | -1.5194 | -2.2791 | 1.9509 | 1.3006 2 | original | 0.0500 | -0.0500 | 0.0000 | 0.0000 2 | rotated | -0.0380 | -0.0380 | 0.0325 | 0.0325 (4 rows)