deegree/deegree3 — pull request #442 by dstenger (2014-10-27 17:27:31+00:00)
Title: Extend tiling api to be able to transform raster images

The tiling API was extended to be able to to transform raster images. Thie pull request does NOT include a raster transformer, so an error is returned if request crs does not match the tile crs (same behaviour in the current implementation, just the error type changed from invalidCrs (in my opinion a wrong type as a user can configure other crs) to illegalRequest)

There are two general problems:
* The source tiles have a different crs and envelope than the request. How can the correct tiles be choosen?
* Raster image transformations are not 100% accurate. Due to that fact, there are small gaps between the tiles if the transformation is done for each tile itself.

To tackle the first problem, the request envelope is transformed to the crs of the first coordinate system known to the TileLayer. Then all tiles are retrieved with the transformed envelope from the tile data set having the first crs (canges in TileLayer). Later, the Java2DTileRenderer checks whether the crs of the tiles and the request crs match. Otherwise a transformation is executed (or error is thrown if there was no transformer injected into tile renderer).

To tackle the second problem, the image is created in the tile crs first and finally the whole image is transformed to the query crs (almost all changes in Java2DTileRenderer). A precondition for this mechanism was to change the API of the TileRenderer: All tiles are given to the renderer instead of just one single.

Finally, the Java2DTileRenderer can now get an ImageTransformer (new interface) via constructor injection. This transformer is used to transform the raster image. If null is injected (status of this pull request), an error is thrown if an user tries to transform tile datsources (same behaviour as in the current implementation; see first passage).