-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend tiling api to be able to transform raster images #442
Conversation
…urce crs in TileLayer
…ery crs if it is different from tile (source) crs
…eRenderer; Null image transformer is passed
…envelope are on the right corner of envelope
See also Issue #423 |
How do I actually use this functionality via a TileStore config? Do all TileStore types support this? |
Thank you for your contribution. Your pull request has been discussed by the TMC today. Please see the following remarks from the TMC members:
However, we found that it is not ready yet for inclusion: |
|
Dear deegree users, |
Thank you for your contribution. Unfortunately, the TMC members came to the conclusion not to merge it into the deegree code base since the PR get stuck (see PR marked for deletion). Of course this is not the final word. If you think, that we did wrong then please re-initiate the Decision Making Process by making a opening an updated pull request and taking the feedback from the TMC into consideration. Perhaps we can then merge that new pull request. Anyhow, we do appreciate your commitment to open source and to deegree in special. |
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:
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).