originalEnvelope.setCoordinateReferenceSystem(crs);
}
// original gridrange (estimated). I am using the floor here in order to make sure
// we always stays inside the real area that we have for the granule
OverviewLevel highResOvLevel = overviewsController.resolutionsLevels.get(0);
final double highestRes[] = new double[] { highResOvLevel.resolutionX, highResOvLevel.resolutionY };
GridEnvelope2D originalGridRange = new GridEnvelope2D(new Rectangle(
(int) (originalEnvelope.getSpan(0) / highestRes[0]),
(int) (originalEnvelope.getSpan(1) / highestRes[1])));
AffineTransform2D raster2Model = new AffineTransform2D(highestRes[0], 0, 0, -highestRes[1],