Changeset 3946 in josm for trunk/src


Ignore:
Timestamp:
2011-03-02T17:51:56+01:00 (13 years ago)
Author:
stoecker
Message:

readd stuff which should not have been removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java

    r3944 r3946  
    6565    public ValidateAction validateAction = new ValidateAction();
    6666
     67    /** Grid detail, multiplier of east,north values for valuable cell sizing */
     68    public static double griddetail;
     69
    6770    public static Collection<String> ignoredErrors = new TreeSet<String>();
    6871
     
    9699    public OsmValidator() {
    97100        checkValidatorDir();
     101        initializeGridDetail();
    98102        initializeTests(getTests());
    99103        loadIgnoredErrors(); //FIXME: load only when needed
     
    150154    public static void saveIgnoredErrors() {
    151155        try {
    152             final PrintWriter out = new PrintWriter(new FileWriter(getValidatorDir()
    153             + "ignorederrors"), false);
     156            final PrintWriter out = new PrintWriter(new FileWriter(getValidatorDir() + "ignorederrors"), false);
    154157            for (String e : ignoredErrors) {
    155158                out.println(e);
     
    232235
    233236    /**
     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    /**
    234252     * Initializes all tests
    235253     * @param allTests The tests to initialize
Note: See TracChangeset for help on using the changeset viewer.