Beispiel #1
0
 @Override
 public void endTest() {
   super.endTest();
   for (Set<OsmPrimitive> duplicated : relations.values()) {
     if (duplicated.size() > 1) {
       TestError testError =
           new TestError(
               this, Severity.ERROR, tr("Duplicated relations"), DUPLICATE_RELATION, duplicated);
       errors.add(testError);
     }
   }
   relations = null;
   for (Set<OsmPrimitive> duplicated : relations_nokeys.values()) {
     if (duplicated.size() > 1) {
       TestError testError =
           new TestError(
               this,
               Severity.WARNING,
               tr("Relations with same members"),
               SAME_RELATION,
               duplicated);
       errors.add(testError);
     }
   }
   relations_nokeys = null;
 }
 @Override
 public void endTest() {
   addErrors(
       Severity.WARNING, getWayEndNodesNearOtherHighway(), tr("Way end node near other highway"));
   addErrors(Severity.WARNING, getWayEndNodesNearOtherWay(), tr("Way end node near other way"));
   /* the following two use a shorter distance */
   if (minmiddledist > 0.0) {
     addErrors(Severity.OTHER, getWayNodesNearOtherWay(), tr("Way node near other way"));
     addErrors(
         Severity.OTHER,
         getConnectedWayEndNodesNearOtherWay(),
         tr("Connected way end node near other way"));
   }
   ways = null;
   endnodes = null;
   endnodesHighway = null;
   middlenodes = null;
   othernodes = null;
   dsArea = null;
   super.endTest();
 }
Beispiel #3
0
  @Override
  public void endTest() {
    super.endTest();
    for (Set<OsmPrimitive> duplicated : ways.values()) {
      if (duplicated.size() > 1) {
        TestError testError =
            new TestError(this, Severity.ERROR, tr("Duplicated ways"), DUPLICATE_WAY, duplicated);
        errors.add(testError);
      }
    }

    for (Set<OsmPrimitive> sameway : waysNoTags.values()) {
      if (sameway.size() > 1) {
        // Report error only if at least some tags are different, as otherwise the error was already
        // reported as duplicated ways
        Map<String, String> tags0 = null;
        boolean skip = true;

        for (OsmPrimitive o : sameway) {
          if (tags0 == null) {
            tags0 = o.getKeys();
            removeUninterestingKeys(tags0);
          } else {
            Map<String, String> tagsCmp = o.getKeys();
            removeUninterestingKeys(tagsCmp);
            if (!tagsCmp.equals(tags0)) {
              skip = false;
              break;
            }
          }
        }
        if (skip) continue;
        TestError testError =
            new TestError(this, Severity.WARNING, tr("Ways with same position"), SAME_WAY, sameway);
        errors.add(testError);
      }
    }
    ways = null;
    waysNoTags = null;
  }
Beispiel #4
0
 @Override
 public void endTest() {
   multipolygonways = null;
   super.endTest();
 }