[Geoserver-devel] [jira] Created: (GEOS-2243) CoverageInfo.getCoverage(envelope, dim) always uses the same CRS as sourceCRS and destCRS instead of using the original coverage CRS as destCRS

CoverageInfo.getCoverage(envelope,dim) always uses the same CRS as sourceCRS and destCRS instead of using the original coverage CRS as destCRS
----------------------------------------------------------------------------------------------------------------------------------------------

                 Key: GEOS-2243
                 URL: http://jira.codehaus.org/browse/GEOS-2243
             Project: GeoServer
          Issue Type: Bug
    Affects Versions: 1.7.0-RC3
            Reporter: Daniele Romagnoli
            Assignee: Andrea Aime
             Fix For: 1.7.0

In "main" module, CoverageInfo.getCoverage method contains the following lines of code:

....
final CoordinateReferenceSystem sourceCRS = envelope.getCoordinateReferenceSystem();
final CoordinateReferenceSystem destCRS = envelope.getCoordinateReferenceSystem();
....

This result in useless future checks on CRS equality, when looking for a MathTransform between requested envelope's CRS and CoverageInfo's envelope's CRS.

The solution is to change the second line of code with:
final CoordinateReferenceSystem destCRS = coverageEnvelope.getCoordinateReferenceSystem();

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