From: Jay S. (JIRA) <ji...@co...> - 2010-10-18 21:05:40
|
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 |