Renderer should be consistent in how AffineTransform is handled with vector and 
raster layers
---------------------------------------------------------------------------------------------

                 Key: GEOT-2762
                 URL: http://jira.codehaus.org/browse/GEOT-2762
             Project: GeoTools
          Issue Type: Improvement
          Components: core render
    Affects Versions: 2.6-M0
            Reporter: Michael Bedward
            Assignee: Michael Bedward


This issue supercedes GEOT-2714.  I'm creating to record my thoughts before I 
forget them :)

This method signature...
GTRenderer.paint( Graphics2D graphics, Rectangle paintArea, ReferencedEnvelope 
mapArea, AffineTransform worldToScreen )

...implies that an AffineTransform created by client code will be used by the 
renderer. The javadocs state this explicitly:
{quote}
         Renders features based on the map layers and their styles as specified 
in
         the map context using <code>setContext</code>. <p/> This version of
         the method assumes that paint area, enelope and worldToScreen transform
         are already computed and in sync. Use this method to avoid 
recomputation.
{quote}

However, vector map layers are treated differently to raster map layers. For 
vector layers, a transform supplied by the client will be used. For raster 
layers, the transform is _only_ used if it specifies rotation, otherwise it is 
sliently ignored and a default transform is calculated with GridEnvelopeMapper. 

I think it would be preferable to make the treatment of a client-supplied 
AffineTransform consistent by having GridCoverageRenderer honour the transform 
whenever it is non-null.

Andrea has pointed out that there are no tests for such a change that that 
comparing rendering results to reference images is hard because of sensitivity 
to different JDK / platform combinations.  

There may also be issues of backwards compatibility for clients that (perhaps 
unknowingly) depend on the current behaviour.

On the other hand, issues such as CRS axis definition applies equally to both 
vector and raster layers so it seems odd to treat them differently.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to