"public/imgs/git@transfer.hft-stuttgart.de:ugl/website.git" did not exist on "ae6462537838c22611384fb626413111bfc8e74b"
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,15 +197,16 @@ public class MisalignedUtilityConnectionCheck extends Check { ...@@ -196,15 +197,16 @@ public class MisalignedUtilityConnectionCheck extends Check {
} }
} }
if (!connected) { if (misalignment) {
// 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) {
misalignedConnections = true; 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) { if (!misalignedConnections && !freeFloating) {
subject.addCheckResult(new CheckResult(this, ResultStatus.OK, null)); 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