* @since 2.6
*/
public final Envelope2D gridToWorld(final GridEnvelope2D gridEnv)
throws TransformException {
MathTransform2D mt = getGridToCRS2D();
if (getGridRange2D().contains(gridEnv)) {
GridCoordinates2D low = gridEnv.getLow();
Point2D trLow = mt.transform(new Point2D.Double(low.x - 0.5, low.y - 0.5), null);
GridCoordinates2D high = gridEnv.getHigh();
Point2D trHigh = mt.transform(new Point2D.Double(high.x + 0.5, high.y + 0.5), null);
return new Envelope2D(
new DirectPosition2D(crs2D, trLow.getX(), trLow.getY()),
new DirectPosition2D(crs2D, trHigh.getX(), trHigh.getY()));