irstv/H2GIS — pull request #31 by agouge (2013-11-14 15:10:22+00:00)
Title: Add affine transformations (ST_Rotate, ST_Scale)

* Add ST_Rotate

By default, PostGIS rotates a geometry about POINT(0,0), while GDMS rotated the
geometry about the center of its internal envelope. GDMS's method is more
logical, so I kept it. The syntax is
```mysql
ST_Rotate(Geometry geom, double theta)
```

On the other hand, in GDMS we couldn't rotate a geometry about an arbitrary
point, so I added this functionality here:
```mysql
ST_Rotate(Geometry geom, double theta, double x0, double y0)
ST_Rotate(Geometry geom, double theta, Geometry pointOrigin)
```

* Add ST_Scale

In PostGIS, we have the functions
```mysql
ST_Scale(geom, xScale, yScale)
ST_Scale(geom, xScale, yScale, zScale)
```

In GDMS, we had the function
```mysql
ST_Scale(geom, scale)
```
I.e., in GDMS, we assumed xScale=yScale. I decided to undo this unnecessary
coupling and also allow the user to scale the z-coordinate. This amounted to
conforming to PostGIS.