Returns a new geometry that is the result of applying the specified 3-D affine transformation.
SELECT Shape.ST_Affine( 1,0,0, 0,1,0, 0,0,1, 5,-1,0 ) FROM SpatialShapes WHERE ShapeID = 5
The following returns the result LineString (.698833 6.965029, .399334 3.980017, 4.379351 3.580683). The Shape is rotated around the Z axis by 0.1 radians (about 5.7 degrees).
SELECT Shape.ST_Affine( cos(0.1),sin(0.1),0, -sin(0.1),cos(0.1),0, 0,0,1, 0,0,0 ) FROM SpatialShapes WHERE ShapeID = 5
SQL/MM (ISO/IEC 13249-3: 2006) Vendor extension