Commit 9ee971c3 authored by Luna Riegel's avatar Luna Riegel
Browse files

Fix: Fix free floating detection loop

parent 8f578e43
...@@ -52,7 +52,6 @@ public class MisalignedUtilityConnectionCheck extends Check { ...@@ -52,7 +52,6 @@ public class MisalignedUtilityConnectionCheck extends Check {
static { static {
ArrayList<CheckId> deps = new ArrayList<>(); ArrayList<CheckId> deps = new ArrayList<>();
deps.add(CheckId.C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION); deps.add(CheckId.C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION);
// deps.add(CheckId.C_TO_FLOATING_UTILITY);
dependencies = Collections.unmodifiableList(deps); dependencies = Collections.unmodifiableList(deps);
ArrayList<Class<? extends Checkable>> classes = new ArrayList<>(); ArrayList<Class<? extends Checkable>> classes = new ArrayList<>();
...@@ -178,12 +177,14 @@ public class MisalignedUtilityConnectionCheck extends Check { ...@@ -178,12 +177,14 @@ public class MisalignedUtilityConnectionCheck extends Check {
subject.addCheckResult(new CheckResult(this, subject.addCheckResult(new CheckResult(this,
ResultStatus.ERROR, new MisalignedConnectionError(sGeo, subject, candidate.getGmlId(), ResultStatus.ERROR, new MisalignedConnectionError(sGeo, subject, candidate.getGmlId(),
MisalignmentType.ASYMMETRIC_ROTATION, ErrorType.ERROR))); MisalignmentType.ASYMMETRIC_ROTATION, ErrorType.ERROR)));
connected = true;
misalignment = true; misalignment = true;
break; break;
case SHEARED: case SHEARED:
subject.addCheckResult(new CheckResult(this, subject.addCheckResult(new CheckResult(this,
ResultStatus.ERROR, new MisalignedConnectionError(sGeo, subject, candidate.getGmlId(), ResultStatus.ERROR, new MisalignedConnectionError(sGeo, subject, candidate.getGmlId(),
MisalignmentType.SHEARED, ErrorType.ERROR))); MisalignmentType.SHEARED, ErrorType.ERROR)));
connected = true;
misalignment = true; misalignment = true;
break; break;
case UNKNOWN: case UNKNOWN:
...@@ -196,14 +197,15 @@ public class MisalignedUtilityConnectionCheck extends Check { ...@@ -196,14 +197,15 @@ public class MisalignedUtilityConnectionCheck extends Check {
} }
} }
if (misalignment) {
misalignedConnections = true;
}
}
if (!connected) { if (!connected) {
// Geometry has no connections and is "floating in space" // Geometry has no connections and is "floating in space"
freeFloating = true; freeFloating = true;
FloatingUtilityError err = new FloatingUtilityError(subject, sGeo); FloatingUtilityError err = new FloatingUtilityError(subject, sGeo);
subject.addCheckResult(new CheckResult(this, ResultStatus.ERROR, err)); subject.addCheckResult(new CheckResult(this, ResultStatus.ERROR, err));
} else if (misalignment) {
misalignedConnections = true;
}
} }
} }
if (!misalignedConnections && !freeFloating) { if (!misalignedConnections && !freeFloating) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment