<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#467886" vlink="#96607D" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt'>By size, what do you mean exactly? It would change the width and height.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>What are you expecting rotation to do. Perhaps you can give example out of the below and some sample<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'>ST_Width, ST_Height, ST_SkewX before and after and what you were expecting.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><a href="https://postgis.net/docs/en/RT_ST_SetRotation.html">https://postgis.net/docs/en/RT_ST_SetRotation.html</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Eloi Ribeiro <mail@eloiribeiro.eu> <br><b>Sent:</b> Monday, March 18, 2024 4:57 AM<br><b>To:</b> PostGIS Users Discussion <postgis-users@lists.osgeo.org><br><b>Subject:</b> How to properly rotate a raster<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial",sans-serif'>Hi all,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:10.5pt;font-family:"Arial",sans-serif'>I need to rotate a raster, for that I'm using the function </span><code><b><span style='font-size:10.0pt'>ST_SetRotation</span></b></code><code><span style='font-size:10.0pt'>, like so:</span></code><span style='font-size:10.5pt;font-family:"Arial",sans-serif'> <o:p></o:p></span></p><div><p class=MsoNormal style='line-height:14.25pt;background:#1F1F1F'><span style='font-size:10.5pt;font-family:"Courier New";color:#6A9955'>CREATE TABLE plot_3_rotated AS <br>SELECT ST_SetRotation(rast, 0.03516235334249185) rast <br>FROM plot_3;</span><span style='font-size:10.5pt;font-family:"Courier New";color:#CCCCCC'><o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial",sans-serif'>But I see that is not producing the expected results and is changing size of the raster. What am I doing wrong?<br><br>Cheers,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial",sans-serif'><o:p> </o:p></span></p></div><div><div><div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial",sans-serif'>Eloi<o:p></o:p></span></p></div></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial",sans-serif'><o:p> </o:p></span></p></div></div></div></div></div></body></html>