Changeset 3944 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2011-03-02T17:44:35+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r3923 r3944 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 70 67 public static Collection<String> ignoredErrors = new TreeSet<String>(); 71 68 … … 99 96 public OsmValidator() { 100 97 checkValidatorDir(); 101 initializeGridDetail();102 98 initializeTests(getTests()); 103 99 loadIgnoredErrors(); //FIXME: load only when needed … … 154 150 public static void saveIgnoredErrors() { 155 151 try { 156 final PrintWriter out = new PrintWriter(new FileWriter(getValidatorDir() + "ignorederrors"), false); 152 final PrintWriter out = new PrintWriter(new FileWriter(getValidatorDir() 153 + "ignorederrors"), false); 157 154 for (String e : ignoredErrors) { 158 155 out.println(e); … … 163 160 } 164 161 } 165 166 private ValidateUploadHook uploadHook;167 168 // public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {169 // if (newFrame != null) {170 // initializeErrorLayer();171 // if (Main.pref.hasKey(ValidatorPreference.PREF_DEBUG + ".grid"))172 // Main.main.addLayer(new GridLayer(tr("Grid")));173 // }174 // }175 162 176 163 public static void initializeErrorLayer() { … … 245 232 246 233 /** 247 * Initialize grid details based on current projection system. Values based on248 * the original value fixed for EPSG:4326 (10000) using heuristics (that is, test&error249 * until most bugs were discovered while keeping the processing time reasonable)250 */251 public void initializeGridDetail() {252 if (Main.proj.toString().equals(new Epsg4326().toString())) {253 OsmValidator.griddetail = 10000;254 } else if (Main.proj.toString().equals(new Mercator().toString())) {255 OsmValidator.griddetail = 0.01;256 } else if (Main.proj.toString().equals(new Lambert().toString())) {257 OsmValidator.griddetail = 0.1;258 }259 }260 261 /**262 234 * Initializes all tests 263 235 * @param allTests The tests to initialize -
trunk/src/org/openstreetmap/josm/gui/preferences/ValidatorPreference.java
r3745 r3944 37 37 public static final String PREFIX = "validator"; 38 38 39 /** The preferences key for debug preferences */ 40 public static final String PREF_DEBUG = PREFIX + ".debug"; 41 42 /** The preferences key for debug preferences */ 39 /** The preferences key for error layer */ 43 40 public static final String PREF_LAYER = PREFIX + ".layer"; 44 41
Note:
See TracChangeset
for help on using the changeset viewer.