This section examines a collection of commonly used transformation functions that provide the ability to: move or translate a geometry from one location to another; rotate a geometry around a supplied point; scale or enlarge/shrink a geometry.
The standard method for implementing these is via the application of an affine transformation matrix.
Oracle Spatial did not provide such capability until 11g, when it provided the SDO_UTIL.AffineTransforms
function. In 10g, Oracle released the UTL_NLA
built-in SYS package (including UTL_NLA_ARRAY_DBL
and UTL_NLA_ARRAY_INT
types), which can be used to construct the appropriate affine transformation matrices to implement spatial transformations. (for Oracle 9i, implementation can be done with custom PL/SQL code, but it is not covered in this book.)
Both the SDO_UTIL.AffineTransforms
and UTL_NLA
-based approaches are provided in the source code associated with this book.