Resampler2D puts BorderExtender hint into wrong Hints object
------------------------------------------------------------

                 Key: GEOT-3297
                 URL: http://jira.codehaus.org/browse/GEOT-3297
             Project: GeoTools
          Issue Type: Bug
    Affects Versions: 2.5.8
            Reporter: Jay Sheridan
            Priority: Minor


The reproject method in org.geotools.coverage.processing.operation.Resampler2D 
uses the wrong Hints object on line 478. It should be using "targetHints" 
instead of "hints". Because it is being put into "hints", the border extender 
hints isn't being passed into the createNS method on line 635 and the returned 
RenderedOp object does not use that hint.

{code:java}
        final double[] background = 
CoverageUtilities.getBackgroundValues(sourceCoverage);
        if (background != null && background.length != 0) {
            if (!automaticGR) {
                final BorderExtender borderExtender;
                if (XArray.allEquals(background, 0)) {
                    borderExtender = 
BorderExtender.createInstance(BorderExtender.BORDER_ZERO);
                } else {
                    borderExtender = new BorderExtenderConstant(background);
                }
                hints.put(JAI.KEY_BORDER_EXTENDER, borderExtender);
            }
        }
{code}

I am using Operations.DEFAULT.resample(), so my workaround for this is to call 
resample twice.

-- 
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

        

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to