irstv/H2GIS — pull request #370 by agouge (2014-06-26 09:49:06+00:00)
Title: Improve ST_Translate

This should fix the issue described in #284. The behavior implemented is
consistent with PostGIS.

```mysql
ST_Translate(NULL, 1, 2),
-- Answer: NULL
ST_Translate(NULL, 1, 2, 3);
-- Answer: NULL
ST_Translate('LINESTRING(0 0, 1 0)', 1, 2),
-- Answer: LINESTRING(1 2, 2 2)
ST_Translate('LINESTRING(0 0, 1 0)', 1, 2, 3),
-- Answer: LINESTRING(1 2, 2 2)
ST_Translate('LINESTRING(0 0 0, 1 0 0)', 1, 2),
-- Answer: LINESTRING(1 2 0, 2 2 0)
ST_Translate('LINESTRING(0 0 0, 1 0 0)', 1, 2, 3);
-- Answer: LINESTRING(1 2 3, 2 2 3)
ST_Translate('LINESTRING(0 0, 1 0 0)', 1, 2);
-- ERROR: Cannot translate geometries of mixed dimension
ST_Translate('LINESTRING(0 0, 1 0 0)', 1, 2, 3);
-- ERROR: Cannot translate geometries of mixed dimension
```