Coverage resulting from Resample / Resampler2D Operation does not always have
requested GridGeometry
----------------------------------------------------------------------------------------------------
Key: GEOT-1412
URL: http://jira.codehaus.org/browse/GEOT-1412
Project: GeoTools
Issue Type: Bug
Components: core coverage
Reporter: Edward Nash
Assignee: Martin Desruisseaux
When using the Resample operator (e.g. to crop and transform a coverage to a
new CRS), the resulting Coverage sometimes has a GridGeometry which differs
from that set in the operator parameters (+1 pixel in width and/or height).
This probably relates to the JAI problem flagged in the inline comment in
Resampler2D.java at line 469:
"The JAI operation sometime returns an image with a bounding box different than
what we
expected. This is true especially for the "Affine" operation: the JAI
documentation said
explicitly that xmin, ymin, width and height image layout hints are ignored for
this one.
As a safety, we check the bounding box in any case. If it doesn't matches, then
we will
reconstruct the target grid geometry."
This unexpected grid geometry is checked for and the actual resulting grid
geometry (which may be different to the requested grid geometry) is returned
from the Resampler2D. This however may lead to downstream errors, e.g. where
two coverages will later be overlaid and despite being resampled to what should
be the same grid geometry, actually have differing grid geometry.
The ideal fix would be to sort out the feature in JAI that causes this.
Failing this, a workaround at the GeoTools level would be good so that the
result is as expected, even if this could result in performance loss.
At the very least, the risk of this occuring should be flagged in the class
documentation so that any client code programmer knows to check for potential
effects and try a workaround or fail gracefully: currently the only place this
possible problem is documented is in the comment copied above inline in the
code.
This may well be what is causing GEOS-1215
(http://jira.codehaus.org/browse/GEOS-1215) [unconfirmed, but my personal
suspicion]
--
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
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel