Index: trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 3944)
+++ trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 3946)
@@ -65,4 +65,7 @@
     public ValidateAction validateAction = new ValidateAction();
 
+    /** Grid detail, multiplier of east,north values for valuable cell sizing */
+    public static double griddetail;
+
     public static Collection<String> ignoredErrors = new TreeSet<String>();
 
@@ -96,4 +99,5 @@
     public OsmValidator() {
         checkValidatorDir();
+        initializeGridDetail();
         initializeTests(getTests());
         loadIgnoredErrors(); //FIXME: load only when needed
@@ -150,6 +154,5 @@
     public static void saveIgnoredErrors() {
         try {
-            final PrintWriter out = new PrintWriter(new FileWriter(getValidatorDir()
-            + "ignorederrors"), false);
+            final PrintWriter out = new PrintWriter(new FileWriter(getValidatorDir() + "ignorederrors"), false);
             for (String e : ignoredErrors) {
                 out.println(e);
@@ -232,4 +235,19 @@
 
     /**
+     * Initialize grid details based on current projection system. Values based on
+     * the original value fixed for EPSG:4326 (10000) using heuristics (that is, test&error
+     * until most bugs were discovered while keeping the processing time reasonable)
+     */
+    public void initializeGridDetail() {
+        if (Main.proj.toString().equals(new Epsg4326().toString())) {
+            OsmValidator.griddetail = 10000;
+        } else if (Main.proj.toString().equals(new Mercator().toString())) {
+            OsmValidator.griddetail = 0.01;
+        } else if (Main.proj.toString().equals(new Lambert().toString())) {
+            OsmValidator.griddetail = 0.1;
+        }
+    }
+
+    /**
      * Initializes all tests
      * @param allTests The tests to initialize
