- Timestamp:
- 2011-03-02T17:51:56+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r3944 r3946 65 65 public ValidateAction validateAction = new ValidateAction(); 66 66 67 /** Grid detail, multiplier of east,north values for valuable cell sizing */ 68 public static double griddetail; 69 67 70 public static Collection<String> ignoredErrors = new TreeSet<String>(); 68 71 … … 96 99 public OsmValidator() { 97 100 checkValidatorDir(); 101 initializeGridDetail(); 98 102 initializeTests(getTests()); 99 103 loadIgnoredErrors(); //FIXME: load only when needed … … 150 154 public static void saveIgnoredErrors() { 151 155 try { 152 final PrintWriter out = new PrintWriter(new FileWriter(getValidatorDir() 153 + "ignorederrors"), false); 156 final PrintWriter out = new PrintWriter(new FileWriter(getValidatorDir() + "ignorederrors"), false); 154 157 for (String e : ignoredErrors) { 155 158 out.println(e); … … 232 235 233 236 /** 237 * Initialize grid details based on current projection system. Values based on 238 * the original value fixed for EPSG:4326 (10000) using heuristics (that is, test&error 239 * until most bugs were discovered while keeping the processing time reasonable) 240 */ 241 public void initializeGridDetail() { 242 if (Main.proj.toString().equals(new Epsg4326().toString())) { 243 OsmValidator.griddetail = 10000; 244 } else if (Main.proj.toString().equals(new Mercator().toString())) { 245 OsmValidator.griddetail = 0.01; 246 } else if (Main.proj.toString().equals(new Lambert().toString())) { 247 OsmValidator.griddetail = 0.1; 248 } 249 } 250 251 /** 234 252 * Initializes all tests 235 253 * @param allTests The tests to initialize
Note:
See TracChangeset
for help on using the changeset viewer.