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 {
static {
ArrayList<CheckId> deps = new ArrayList<>();
deps.add(CheckId.C_GE_S_ALL_POLYGONS_WRONG_ORIENTATION);
// deps.add(CheckId.C_TO_FLOATING_UTILITY);
dependencies = Collections.unmodifiableList(deps);
ArrayList<Class<? extends Checkable>> classes = new ArrayList<>();
......@@ -178,12 +177,14 @@ public class MisalignedUtilityConnectionCheck extends Check {
subject.addCheckResult(new CheckResult(this,
ResultStatus.ERROR, new MisalignedConnectionError(sGeo, subject, candidate.getGmlId(),
MisalignmentType.ASYMMETRIC_ROTATION, ErrorType.ERROR)));
connected = true;
misalignment = true;
break;
case SHEARED:
subject.addCheckResult(new CheckResult(this,
ResultStatus.ERROR, new MisalignedConnectionError(sGeo, subject, candidate.getGmlId(),
MisalignmentType.SHEARED, ErrorType.ERROR)));
connected = true;
misalignment = true;
break;
case UNKNOWN:
......@@ -196,15 +197,16 @@ public class MisalignedUtilityConnectionCheck extends Check {
}
}
if (!connected) {
// Geometry has no connections and is "floating in space"
freeFloating = true;
FloatingUtilityError err = new FloatingUtilityError(subject, sGeo);
subject.addCheckResult(new CheckResult(this, ResultStatus.ERROR, err));
} else if (misalignment) {
if (misalignment) {
misalignedConnections = true;
}
}
if (!connected) {
// Geometry has no connections and is "floating in space"
freeFloating = true;
FloatingUtilityError err = new FloatingUtilityError(subject, sGeo);
subject.addCheckResult(new CheckResult(this, ResultStatus.ERROR, err));
}
}
if (!misalignedConnections && !freeFloating) {
subject.addCheckResult(new CheckResult(this, ResultStatus.OK, null));
......
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