diff --git a/modules/library/referencing/src/main/java/org/geotools/referencing/CRS.java b/modules/library/referencing/src/main/java/org/geotools/referencing/CRS.java
index e423f34..505fdf7 100644
--- a/modules/library/referencing/src/main/java/org/geotools/referencing/CRS.java
+++ b/modules/library/referencing/src/main/java/org/geotools/referencing/CRS.java
@@ -35,6 +35,7 @@ import org.opengis.referencing.*;
 import org.opengis.referencing.crs.*;
 import org.opengis.referencing.datum.*;
 import org.opengis.referencing.operation.*;
+import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.EllipsoidalCS;
 import org.opengis.referencing.cs.CartesianCS;
 import org.opengis.referencing.cs.CoordinateSystem;
@@ -114,6 +115,10 @@ import org.geotools.util.UnsupportedImplementationException;
  * @tutorial http://docs.codehaus.org/display/GEOTOOLS/Coordinate+Transformation+Services+for+Geotools+2.1
  */
 public final class CRS {
+    public static enum AxisOrder {
+        LON_LAT, LAT_LON, INAPPLICABLE;
+    };
+    
     /**
      * A map with {@link Hints#FORCE_LONGITUDE_FIRST_AXIS_ORDER} set to {@link Boolean#TRUE}.
      */
@@ -1720,7 +1725,45 @@ search:             if (DefaultCoordinateSystemAxis.isCompassDirection(axis.getD
         DefaultMathTransformFactory.cleanupThreadLocals();
         Formattable.cleanupThreadLocals();
     }
+    
+    public static AxisOrder getAxisOrder(CoordinateReferenceSystem crs) {
+        CoordinateSystem cs = null;
+
+        if (crs instanceof ProjectedCRS) {
+            ProjectedCRS pcrs = (ProjectedCRS) crs;
+            cs = pcrs.getBaseCRS().getCoordinateSystem();
+        } else if (crs instanceof GeographicCRS) {
+            cs = crs.getCoordinateSystem();
+        } else {
+            return AxisOrder.INAPPLICABLE;
+        }
+
+        int dimension = cs.getDimension();
+        int longitudeDim = -1;
+        int latitudeDim = -1;
+
+        for (int i = 0; i < dimension; i++) {
+            AxisDirection dir = cs.getAxis(i).getDirection().absolute();
+
+            if (dir.equals(AxisDirection.EAST)) {
+                longitudeDim = i;
+            }
 
+            if (dir.equals(AxisDirection.NORTH)) {
+                latitudeDim = i;
+            }
+        }
+
+        if ((longitudeDim >= 0) && (latitudeDim >= 0)) {
+            if (longitudeDim < latitudeDim) {
+                return AxisOrder.LON_LAT;
+            } else {
+                return AxisOrder.LAT_LON;
+            }
+        }
+
+        return AxisOrder.INAPPLICABLE;
+    }
 
     /**
      * Prints to the {@linkplain System#out standard output stream} some information about
diff --git a/modules/library/render/src/main/java/org/geotools/renderer/crs/WrappingProjectionHandler.java b/modules/library/render/src/main/java/org/geotools/renderer/crs/WrappingProjectionHandler.java
index f91bf21..04912d1 100644
--- a/modules/library/render/src/main/java/org/geotools/renderer/crs/WrappingProjectionHandler.java
+++ b/modules/library/render/src/main/java/org/geotools/renderer/crs/WrappingProjectionHandler.java
@@ -52,12 +52,18 @@ public class WrappingProjectionHandler extends ProjectionHandler {
         super(renderingEnvelope, validArea);
 
         try {
-            MathTransform mt = CRS.findMathTransform(WGS84, renderingEnvelope.getCoordinateReferenceSystem(), true);
+            CoordinateReferenceSystem targetCRS = renderingEnvelope.getCoordinateReferenceSystem();
+            MathTransform mt = CRS.findMathTransform(WGS84, targetCRS, true);
             double[] src = new double[] { centralMeridian, 0, 180 + centralMeridian, 0 };
             double[] dst = new double[4];
             mt.transform(src, 0, dst, 0, 2);
 
-            radius = Math.abs(dst[2] - dst[0]);
+            if(CRS.getAxisOrder(targetCRS) == CRS.AxisOrder.LAT_LON) {
+                radius = Math.abs(dst[3] - dst[1]);
+            }
+            else {
+                radius = Math.abs(dst[2] - dst[0]);
+            }
             
             if(radius <= 0) {
                 throw new RuntimeException("Computed Earth radius is 0, what is going on?");
