Index: trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 10032)
+++ trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 10033)
@@ -9,4 +9,5 @@
 import static java.lang.Math.sqrt;
 import static java.lang.Math.toRadians;
+import static org.openstreetmap.josm.data.projection.Ellipsoid.WGS84;
 import static org.openstreetmap.josm.tools.I18n.trc;
 
@@ -325,8 +326,7 @@
      */
     public double greatCircleDistance(LatLon other) {
-        double R = 6378135;
         double sinHalfLat = sin(toRadians(other.lat() - this.lat()) / 2);
         double sinHalfLon = sin(toRadians(other.lon() - this.lon()) / 2);
-        double d = 2 * R * asin(
+        double d = 2 * WGS84.a * asin(
                 sqrt(sinHalfLat*sinHalfLat +
                         cos(toRadians(this.lat()))*cos(toRadians(other.lat()))*sinHalfLon*sinHalfLon));
@@ -336,5 +336,5 @@
         if (java.lang.Double.isNaN(d)) {
             Main.error("NaN in greatCircleDistance");
-            d = PI * R;
+            d = PI * WGS84.a;
         }
         return d;
Index: trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java	(revision 10032)
+++ trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java	(revision 10033)
@@ -101,5 +101,4 @@
      */
     public static final Ellipsoid WGS84 = Ellipsoid.create_a_rf(6378137.0, 298.257223563);
-
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 10032)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 10033)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.mappaint.mapcss;
+
+import static org.openstreetmap.josm.data.projection.Ellipsoid.WGS84;
 
 import java.util.Collection;
@@ -637,6 +639,4 @@
         }
 
-        private static final double R = 6378135;
-
         public static double level2scale(int lvl) {
             if (lvl < 0)
@@ -644,5 +644,5 @@
             // preliminary formula - map such that mapnik imagery tiles of the same
             // or similar level are displayed at the given scale
-            return 2.0 * Math.PI * R / Math.pow(2.0, lvl) / 2.56;
+            return 2.0 * Math.PI * WGS84.a / Math.pow(2.0, lvl) / 2.56;
         }
 
@@ -650,5 +650,5 @@
             if (scale < 0)
                 throw new IllegalArgumentException("scale must be >= 0 but is "+scale);
-            return (int) Math.floor(Math.log(2 * Math.PI * R / 2.56 / scale) / Math.log(2));
+            return (int) Math.floor(Math.log(2 * Math.PI * WGS84.a / 2.56 / scale) / Math.log(2));
         }
 
