<div dir="ltr">Hmm, I know so little about Euler, strike, dip and rake.  What are the advantages?<br><br>What I do know is that it's easy now to construct a 3 axis rotation function (which also might be better handled with ST_Affine):<br>
<br><a href="http://trac.osgeo.org/postgis/attachment/ticket/2575/">http://trac.osgeo.org/postgis/attachment/ticket/2575/</a><br><br>-- Function: st_rotatezyz(geometry, double precision, double precision, double precision, geometry)<br>
CREATE OR REPLACE FUNCTION ST_RotateXYZ(geomA geometry, rotRadiansX double precision, rotRadiansY double precision, rotRadiansZ double precision, pointOrigin geometry)<br>  RETURNS geometry AS<br>$BODY$<br><br>-- Rotate around X-axis<br>
WITH rotatedX AS (<br>    SELECT ST_RotateX(geomA, rotRadiansX, pointOrigin) AS geom<br>    ),<br>-- Rotate around Y-axis<br>rotatedXY AS (<br>    SELECT ST_RotateY(geom, rotRadiansY, pointOrigin) AS geom<br>      FROM rotatedX<br>
    ),<br>-- Rotate around Z-axis<br>rotatedXYZ AS (<br>    SELECT ST_Rotate(geom, rotRadiansZ, pointOrigin) AS geom<br>      FROM rotatedXY<br>    )<br>-- Return rotated geometry<br>SELECT geom from rotatedXYZ<br>;<br><br>
$BODY$<br>  LANGUAGE sql VOLATILE<br>  COST 100;<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 15, 2013 at 9:27 PM, Mike Toews <span dir="ltr"><<a href="mailto:mwtoews@gmail.com" target="_blank">mwtoews@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">What do you need to rotate on either X or Y axes? And is it always aligned to either grid directions? I personally see these functions as rather limiting and wouldn't miss them if they vanished.</p>

<p dir="ltr">I have thought of developing a better 3d rotate function that is independent of grid X and Y assumptions. Either a function that takes Euler angles, or strike & dip (& possibly rake) angles used by geologists. If there is any interest on these, I can figure some stuff out.</p>
<span class="HOEnZb"><font color="#888888">

<p dir="ltr">-Mike</p>
</font></span><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>