Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
4921f946
Commit
4921f946
authored
Jun 11, 2025
by
Beuster
Browse files
Merge branch 'dev' into test-environment
parents
32f20330
31710fb8
Pipeline
#11358
passed with stage
in 1 minute and 35 seconds
Changes
36
Pipelines
2
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/PolygonWrongOrientationError.java
View file @
4921f946
...
@@ -23,7 +23,6 @@ import java.util.HashSet;
...
@@ -23,7 +23,6 @@ import java.util.HashSet;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
...
@@ -43,30 +42,25 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
...
@@ -43,30 +42,25 @@ import de.hft.stuttgart.citydoctor2.datastructure.Polygon;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
PolygonWrongOrientationError
implem
en
t
s
Check
Error
{
public
class
PolygonWrongOrientationError
ext
en
d
s
Solid
Error
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
3006643655816847097L
;
private
static
final
long
serialVersionUID
=
-
3006643655816847097L
;
private
final
List
<
Edge
>
edges
;
private
final
List
<
Edge
>
edges
;
private
final
Geometry
g
;
public
PolygonWrongOrientationError
(
Geometry
g
,
List
<
Edge
>
edges
)
{
public
PolygonWrongOrientationError
(
Geometry
g
,
List
<
Edge
>
edges
)
{
super
(
g
);
this
.
edges
=
edges
;
this
.
edges
=
edges
;
this
.
g
=
g
;
}
}
public
List
<
Edge
>
getEdges
()
{
public
List
<
Edge
>
getEdges
()
{
return
edges
;
return
edges
;
}
}
public
Geometry
getGeometry
()
{
return
g
;
}
@Override
@Override
public
void
report
(
ErrorReport
report
)
{
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
g
);
super
.
report
(
report
);
Set
<
Polygon
>
possiblePolygons
=
new
HashSet
<>();
Set
<
Polygon
>
possiblePolygons
=
new
HashSet
<>();
for
(
Edge
e
:
edges
)
{
for
(
Edge
e
:
edges
)
{
possiblePolygons
.
addAll
(
e
.
getAdjacentPolygons
());
possiblePolygons
.
addAll
(
e
.
getAdjacentPolygons
());
...
@@ -76,17 +70,18 @@ public class PolygonWrongOrientationError implements CheckError {
...
@@ -76,17 +70,18 @@ public class PolygonWrongOrientationError implements CheckError {
@Override
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
super
.
accept
(
errorVisitor
);
errorVisitor
.
visit
(
this
);
errorVisitor
.
visit
(
this
);
}
}
@Override
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
return
super
.
accept
(
method
,
l
)
||
method
.
visit
(
this
,
l
);
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"PolygonWrongOrientationError [edges="
+
edges
+
", g="
+
g
+
"]"
;
return
"PolygonWrongOrientationError [edges="
+
edges
+
", g="
+
g
etGeometry
()
+
"]"
;
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingDuplicatePointError.java
View file @
4921f946
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.check.error
;
package
de.hft.stuttgart.citydoctor2.check.error
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
...
@@ -29,8 +30,6 @@ import de.hft.stuttgart.citydoctor2.datastructure.GmlElement;
...
@@ -29,8 +30,6 @@ import de.hft.stuttgart.citydoctor2.datastructure.GmlElement;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vertex
;
import
java.io.Serial
;
/**
/**
* When a point is repeated in a linear ring, but is not consecutive. This
* When a point is repeated in a linear ring, but is not consecutive. This
* results in a self intersection of the ring and this error object is created.
* results in a self intersection of the ring and this error object is created.
...
@@ -38,30 +37,20 @@ import java.io.Serial;
...
@@ -38,30 +37,20 @@ import java.io.Serial;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
RingDuplicatePointError
implem
en
t
s
Check
Error
{
public
class
RingDuplicatePointError
ext
en
d
s
RingSelfIntersection
Error
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
7208982075173209953L
;
private
static
final
long
serialVersionUID
=
7208982075173209953L
;
private
final
LinearRing
r
;
private
final
Vertex
v1
;
private
final
Vertex
v1
;
private
final
Vertex
v2
;
private
final
Vertex
v2
;
public
RingDuplicatePointError
(
LinearRing
r
,
Vertex
v1
,
Vertex
v2
)
{
public
RingDuplicatePointError
(
LinearRing
r
,
Vertex
v1
,
Vertex
v2
)
{
this
.
r
=
r
;
super
(
r
)
;
this
.
v1
=
v1
;
this
.
v1
=
v1
;
this
.
v2
=
v2
;
this
.
v2
=
v2
;
}
}
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
errorVisitor
.
visit
(
this
);
}
public
LinearRing
getRing
()
{
return
r
;
}
public
Vertex
getVertex1
()
{
public
Vertex
getVertex1
()
{
return
v1
;
return
v1
;
}
}
...
@@ -70,21 +59,27 @@ public class RingDuplicatePointError implements CheckError {
...
@@ -70,21 +59,27 @@ public class RingDuplicatePointError implements CheckError {
return
v2
;
return
v2
;
}
}
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
super
.
accept
(
errorVisitor
);
errorVisitor
.
visit
(
this
);
}
@Override
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
return
super
.
accept
(
method
,
l
)
||
method
.
visit
(
this
,
l
);
}
}
@Override
@Override
public
void
report
(
ErrorReport
report
)
{
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
r
);
super
.
report
(
report
);
report
.
add
(
"duplicate point 1"
,
v1
);
report
.
add
(
"duplicate point 1"
,
v1
);
report
.
add
(
"duplicate point 2"
,
v2
);
report
.
add
(
"duplicate point 2"
,
v2
);
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"DuplicatePointError [r="
+
r
+
", v1="
+
v1
+
", v2="
+
v2
+
"]"
;
return
"DuplicatePointError [r="
+
getRing
()
+
", v1="
+
v1
+
", v2="
+
v2
+
"]"
;
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingEdgeIntersectionError.java
View file @
4921f946
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.check.error
;
package
de.hft.stuttgart.citydoctor2.check.error
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
...
@@ -30,8 +31,6 @@ import de.hft.stuttgart.citydoctor2.datastructure.GmlElement;
...
@@ -30,8 +31,6 @@ import de.hft.stuttgart.citydoctor2.datastructure.GmlElement;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.math.Vector3d
;
import
de.hft.stuttgart.citydoctor2.math.Vector3d
;
import
java.io.Serial
;
/**
/**
* When two edges of the same linear ring are intersecting with each other this
* When two edges of the same linear ring are intersecting with each other this
* error object is created.
* error object is created.
...
@@ -39,7 +38,7 @@ import java.io.Serial;
...
@@ -39,7 +38,7 @@ import java.io.Serial;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
RingEdgeIntersectionError
implem
en
t
s
Check
Error
{
public
class
RingEdgeIntersectionError
ext
en
d
s
RingSelfIntersection
Error
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
4923311259469198172L
;
private
static
final
long
serialVersionUID
=
4923311259469198172L
;
...
@@ -47,20 +46,15 @@ public class RingEdgeIntersectionError implements CheckError {
...
@@ -47,20 +46,15 @@ public class RingEdgeIntersectionError implements CheckError {
private
final
Edge
e1
;
private
final
Edge
e1
;
private
final
Edge
e2
;
private
final
Edge
e2
;
private
final
Vector3d
intersection
;
private
final
Vector3d
intersection
;
private
final
LinearRing
lr
;
public
RingEdgeIntersectionError
(
LinearRing
lr
,
Edge
e1
,
Edge
e2
,
Vector3d
intersection
)
{
public
RingEdgeIntersectionError
(
LinearRing
lr
,
Edge
e1
,
Edge
e2
,
Vector3d
intersection
)
{
if
(
e1
==
null
||
e2
==
null
||
lr
==
null
||
intersection
==
null
)
{
super
(
lr
);
if
(
e1
==
null
||
e2
==
null
||
intersection
==
null
)
{
throw
new
IllegalArgumentException
(
"Parameters may not be null"
);
throw
new
IllegalArgumentException
(
"Parameters may not be null"
);
}
}
this
.
e1
=
e1
;
this
.
e1
=
e1
;
this
.
e2
=
e2
;
this
.
e2
=
e2
;
this
.
intersection
=
intersection
;
this
.
intersection
=
intersection
;
this
.
lr
=
lr
;
}
public
LinearRing
getRing
()
{
return
lr
;
}
}
public
Edge
getEdge1
()
{
public
Edge
getEdge1
()
{
...
@@ -78,7 +72,7 @@ public class RingEdgeIntersectionError implements CheckError {
...
@@ -78,7 +72,7 @@ public class RingEdgeIntersectionError implements CheckError {
@Override
@Override
public
void
report
(
ErrorReport
report
)
{
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
"type"
,
"edge intersection"
);
report
.
add
(
"type"
,
"edge intersection"
);
report
.
add
(
lr
);
super
.
report
(
report
);
report
.
add
(
e1
);
report
.
add
(
e1
);
report
.
add
(
e2
);
report
.
add
(
e2
);
report
.
add
(
"intersection point"
,
intersection
);
report
.
add
(
"intersection point"
,
intersection
);
...
@@ -86,17 +80,18 @@ public class RingEdgeIntersectionError implements CheckError {
...
@@ -86,17 +80,18 @@ public class RingEdgeIntersectionError implements CheckError {
@Override
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
super
.
accept
(
errorVisitor
);
errorVisitor
.
visit
(
this
);
errorVisitor
.
visit
(
this
);
}
}
@Override
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
return
super
.
accept
(
method
,
l
)
||
method
.
visit
(
this
,
l
);
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"EdgeIntersectionError [e1="
+
e1
+
", e2="
+
e2
+
", intersection="
+
intersection
+
", lr="
+
lr
+
"]"
;
return
"EdgeIntersectionError [e1="
+
e1
+
", e2="
+
e2
+
", intersection="
+
intersection
+
", lr="
+
getRing
()
+
"]"
;
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingError.java
0 → 100644
View file @
4921f946
package
de.hft.stuttgart.citydoctor2.check.error
;
import
java.io.Serial
;
import
java.util.Objects
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
public
abstract
class
RingError
implements
CheckError
{
@Serial
private
static
final
long
serialVersionUID
=
-
1579410065481104979L
;
private
final
LinearRing
ring
;
public
RingError
(
LinearRing
ring
)
{
Objects
.
requireNonNull
(
ring
);
this
.
ring
=
ring
;
}
public
LinearRing
getRing
()
{
return
ring
;
}
@Override
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
ring
);
}
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
errorVisitor
.
visit
(
this
);
}
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingNotClosedError.java
View file @
4921f946
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.check.error
;
package
de.hft.stuttgart.citydoctor2.check.error
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
...
@@ -28,8 +29,6 @@ import de.hft.stuttgart.citydoctor2.check.ModificationListener;
...
@@ -28,8 +29,6 @@ import de.hft.stuttgart.citydoctor2.check.ModificationListener;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
java.io.Serial
;
/**
/**
* If the first and last point of a linear ring are not the same, this error is
* If the first and last point of a linear ring are not the same, this error is
* created.
* created.
...
@@ -37,39 +36,34 @@ import java.io.Serial;
...
@@ -37,39 +36,34 @@ import java.io.Serial;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
RingNotClosedError
implements
CheckError
{
public
class
RingNotClosedError
extends
RingError
{
@Serial
private
static
final
long
serialVersionUID
=
2554099996830579201L
;
private
final
LinearRing
ring
;
public
RingNotClosedError
(
LinearRing
ring
)
{
public
RingNotClosedError
(
LinearRing
ring
)
{
this
.
ring
=
ring
;
super
(
ring
)
;
}
}
public
LinearRing
getRing
()
{
@Serial
return
ring
;
private
static
final
long
serialVersionUID
=
2554099996830579201L
;
}
@Override
@Override
public
void
report
(
ErrorReport
report
)
{
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
ring
);
super
.
report
(
report
);
}
}
@Override
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
super
.
accept
(
errorVisitor
);
errorVisitor
.
visit
(
this
);
errorVisitor
.
visit
(
this
);
}
}
@Override
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
return
super
.
accept
(
method
,
l
)
||
method
.
visit
(
this
,
l
);
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"RingNotClosedError [ring="
+
r
ing
+
"]"
;
return
"RingNotClosedError [ring="
+
getR
ing
()
+
"]"
;
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingSelfIntersectionError.java
0 → 100644
View file @
4921f946
package
de.hft.stuttgart.citydoctor2.check.error
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
public
abstract
class
RingSelfIntersectionError
extends
RingError
{
@Serial
private
static
final
long
serialVersionUID
=
-
4528714710581552235L
;
public
RingSelfIntersectionError
(
LinearRing
ring
)
{
super
(
ring
);
}
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
super
.
accept
(
errorVisitor
);
errorVisitor
.
visit
(
this
);
}
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
super
.
accept
(
method
,
l
)
||
method
.
visit
(
this
,
l
);
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/RingTooFewPointsError.java
View file @
4921f946
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.check.error
;
package
de.hft.stuttgart.citydoctor2.check.error
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
...
@@ -28,47 +29,40 @@ import de.hft.stuttgart.citydoctor2.check.ModificationListener;
...
@@ -28,47 +29,40 @@ import de.hft.stuttgart.citydoctor2.check.ModificationListener;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
de.hft.stuttgart.citydoctor2.datastructure.LinearRing
;
import
java.io.Serial
;
/**
/**
* If a linear ring has less than 4 distinct points, it is has too few points.
* If a linear ring has less than 4 distinct points, it is has too few points.
*
*
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
RingTooFewPointsError
implem
en
t
s
Check
Error
{
public
class
RingTooFewPointsError
ext
en
d
s
Ring
Error
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
7207518573842743261L
;
private
static
final
long
serialVersionUID
=
7207518573842743261L
;
private
final
LinearRing
lr
;
public
RingTooFewPointsError
(
LinearRing
lr
)
{
public
RingTooFewPointsError
(
LinearRing
lr
)
{
this
.
lr
=
lr
;
super
(
lr
);
}
public
LinearRing
getRing
()
{
return
lr
;
}
}
@Override
@Override
public
void
report
(
ErrorReport
report
)
{
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
lr
);
super
.
report
(
report
);
}
}
@Override
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
super
.
accept
(
errorVisitor
);
errorVisitor
.
visit
(
this
);
errorVisitor
.
visit
(
this
);
}
}
@Override
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
return
super
.
accept
(
method
,
l
)
||
method
.
visit
(
this
,
l
);
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"TooFewPointsError [
l
r="
+
lr
+
"]"
;
return
"TooFewPointsError [r
ing
="
+
getRing
()
+
"]"
;
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/SolidError.java
0 → 100644
View file @
4921f946
package
de.hft.stuttgart.citydoctor2.check.error
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.ModificationListener
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
public
abstract
class
SolidError
implements
CheckError
{
@Serial
private
static
final
long
serialVersionUID
=
4251342593056430783L
;
private
Geometry
geom
;
public
SolidError
(
Geometry
geom
)
{
this
.
geom
=
geom
;
}
public
Geometry
getGeometry
()
{
return
geom
;
}
@Override
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
geom
);
}
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
errorVisitor
.
visit
(
this
);
}
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
}
}
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/SolidNotClosedError.java
View file @
4921f946
...
@@ -21,7 +21,6 @@ package de.hft.stuttgart.citydoctor2.check.error;
...
@@ -21,7 +21,6 @@ package de.hft.stuttgart.citydoctor2.check.error;
import
java.io.Serial
;
import
java.io.Serial
;
import
java.util.List
;
import
java.util.List
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
...
@@ -39,21 +38,16 @@ import de.hft.stuttgart.citydoctor2.datastructure.GmlElement;
...
@@ -39,21 +38,16 @@ import de.hft.stuttgart.citydoctor2.datastructure.GmlElement;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
SolidNotClosedError
implem
en
t
s
Check
Error
{
public
class
SolidNotClosedError
ext
en
d
s
Solid
Error
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
8256385219885788891L
;
private
static
final
long
serialVersionUID
=
8256385219885788891L
;
private
final
List
<
Edge
>
errorEdges
;
private
final
List
<
Edge
>
errorEdges
;
private
final
Geometry
g
;
public
SolidNotClosedError
(
Geometry
g
,
List
<
Edge
>
errorEdges
)
{
public
SolidNotClosedError
(
Geometry
g
,
List
<
Edge
>
errorEdges
)
{
super
(
g
);
this
.
errorEdges
=
errorEdges
;
this
.
errorEdges
=
errorEdges
;
this
.
g
=
g
;
}
public
Geometry
getGeometry
()
{
return
g
;
}
}
public
List
<
Edge
>
getErrorEdges
()
{
public
List
<
Edge
>
getErrorEdges
()
{
...
@@ -62,23 +56,24 @@ public class SolidNotClosedError implements CheckError {
...
@@ -62,23 +56,24 @@ public class SolidNotClosedError implements CheckError {
@Override
@Override
public
void
report
(
ErrorReport
report
)
{
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
g
);
super
.
report
(
report
);
report
.
addEdges
(
"open edges"
,
errorEdges
);
report
.
addEdges
(
"open edges"
,
errorEdges
);
}
}
@Override
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
super
.
accept
(
errorVisitor
);
errorVisitor
.
visit
(
this
);
errorVisitor
.
visit
(
this
);
}
}
@Override
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
return
super
.
accept
(
method
,
l
)
||
method
.
visit
(
this
,
l
);
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"SolidNotClosedError [errorEdges="
+
errorEdges
+
", g="
+
g
+
"]"
;
return
"SolidNotClosedError [errorEdges="
+
errorEdges
+
", g="
+
g
etGeometry
()
+
"]"
;
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/SolidSelfIntError.java
View file @
4921f946
...
@@ -21,9 +21,7 @@ package de.hft.stuttgart.citydoctor2.check.error;
...
@@ -21,9 +21,7 @@ package de.hft.stuttgart.citydoctor2.check.error;
import
java.io.Serial
;
import
java.io.Serial
;
import
java.util.List
;
import
java.util.List
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
import
de.hft.stuttgart.citydoctor2.check.HealingMethod
;
...
@@ -38,46 +36,37 @@ import de.hft.stuttgart.citydoctor2.utils.PolygonIntersection;
...
@@ -38,46 +36,37 @@ import de.hft.stuttgart.citydoctor2.utils.PolygonIntersection;
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
SolidSelfIntError
implem
en
t
s
Check
Error
{
public
class
SolidSelfIntError
ext
en
d
s
Solid
Error
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
-
4479936555545861422L
;
private
static
final
long
serialVersionUID
=
-
4479936555545861422L
;
private
final
Geometry
g
;
private
final
List
<
PolygonIntersection
>
intersections
;
private
final
List
<
PolygonIntersection
>
intersections
;
public
SolidSelfIntError
(
Geometry
g
,
List
<
PolygonIntersection
>
intersections
)
{
public
SolidSelfIntError
(
Geometry
g
,
List
<
PolygonIntersection
>
intersections
)
{
this
.
g
=
g
;
super
(
g
)
;
this
.
intersections
=
intersections
;
this
.
intersections
=
intersections
;
}
}
public
Geometry
getGeometry
()
{
return
g
;
}
@Override
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
g
);
}
public
List
<
PolygonIntersection
>
getIntersections
()
{
public
List
<
PolygonIntersection
>
getIntersections
()
{
return
intersections
;
return
intersections
;
}
}
@Override
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
super
.
accept
(
errorVisitor
);
errorVisitor
.
visit
(
this
);
errorVisitor
.
visit
(
this
);
}
}
@Override
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
return
super
.
accept
(
method
,
l
)
||
method
.
visit
(
this
,
l
);
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"SolidSelfIntError [g="
+
g
+
", intersection="
+
intersections
+
"]"
;
return
"SolidSelfIntError [g="
+
g
etGeometry
()
+
", intersection="
+
intersections
+
"]"
;
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/error/TooFewPolygonsError.java
View file @
4921f946
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
*/
*/
package
de.hft.stuttgart.citydoctor2.check.error
;
package
de.hft.stuttgart.citydoctor2.check.error
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
java.io.Serial
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorId
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorReport
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
import
de.hft.stuttgart.citydoctor2.check.ErrorType
;
...
@@ -28,48 +29,42 @@ import de.hft.stuttgart.citydoctor2.check.ModificationListener;
...
@@ -28,48 +29,42 @@ import de.hft.stuttgart.citydoctor2.check.ModificationListener;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.Geometry
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
de.hft.stuttgart.citydoctor2.datastructure.GmlElement
;
import
java.io.Serial
;
/**
/**
* When a geometry has less than 4 polygons, it cannot form a valid solid.
* When a geometry has less than 4 polygons, it cannot form a valid solid.
*
*
* @author Matthias Betz
* @author Matthias Betz
*
*
*/
*/
public
class
TooFewPolygonsError
implem
en
t
s
Check
Error
{
public
class
TooFewPolygonsError
ext
en
d
s
Solid
Error
{
@Serial
@Serial
private
static
final
long
serialVersionUID
=
5800732409355221678L
;
private
static
final
long
serialVersionUID
=
5800732409355221678L
;
private
final
Geometry
g
;
public
TooFewPolygonsError
(
Geometry
g
)
{
public
TooFewPolygonsError
(
Geometry
g
)
{
this
.
g
=
g
;
super
(
g
)
;
}
}
public
Geometry
getGeometry
()
{
return
g
;
}
@Override
@Override
public
void
report
(
ErrorReport
report
)
{
public
void
report
(
ErrorReport
report
)
{
report
.
add
(
g
);
super
.
report
(
report
);
report
.
add
(
"number of polygons"
,
g
.
getPolygons
().
size
());
report
.
add
(
"number of polygons"
,
g
etGeometry
()
.
getPolygons
().
size
());
}
}
@Override
@Override
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
public
void
accept
(
ErrorVisitor
errorVisitor
)
{
super
.
accept
(
errorVisitor
);
errorVisitor
.
visit
(
this
);
errorVisitor
.
visit
(
this
);
}
}
@Override
@Override
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
public
boolean
accept
(
HealingMethod
method
,
ModificationListener
l
)
{
return
method
.
visit
(
this
,
l
);
return
super
.
accept
(
method
,
l
)
||
method
.
visit
(
this
,
l
);
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"TooFewPolygonsError [g="
+
g
+
"]"
;
return
"TooFewPolygonsError [g="
+
g
etGeometry
()
+
"]"
;
}
}
@Override
@Override
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/Edge.java
View file @
4921f946
...
@@ -48,9 +48,6 @@ public class Edge implements Serializable {
...
@@ -48,9 +48,6 @@ public class Edge implements Serializable {
this
.
to
=
to
;
this
.
to
=
to
;
}
}
private
Edge
()
{
}
public
Vertex
getFrom
()
{
public
Vertex
getFrom
()
{
return
from
;
return
from
;
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/datastructure/LinkedPolygon.java
View file @
4921f946
...
@@ -44,9 +44,6 @@ public class LinkedPolygon extends Polygon {
...
@@ -44,9 +44,6 @@ public class LinkedPolygon extends Polygon {
private
Geometry
parent
;
private
Geometry
parent
;
private
ConcretePolygon
poly
;
private
ConcretePolygon
poly
;
private
LinkedPolygon
()
{
}
/**
/**
* @param poly polygon this is linked to
* @param poly polygon this is linked to
* @param parent the parent of the linked polygon
* @param parent the parent of the linked polygon
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/CheckErrorFound.java
View file @
4921f946
package
de.hft.stuttgart.citydoctor2.utils
;
package
de.hft.stuttgart.citydoctor2.utils
;
import
java.io.Serial
;
/**
/**
* This Throwable signals that a requested CheckError was found.
* This Throwable signals that a requested CheckError was found.
*/
*/
public
class
CheckErrorFound
extends
Throwable
{
public
class
CheckErrorFound
extends
Throwable
{
@Serial
private
static
final
long
serialVersionUID
=
-
2066876428396230230L
;
public
CheckErrorFound
()
{
public
CheckErrorFound
()
{
super
(
"CheckError was found"
,
null
,
true
,
false
);
super
(
"CheckError was found"
,
null
,
true
,
false
);
...
...
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/ListErrorVisitor.java
View file @
4921f946
...
@@ -22,7 +22,9 @@ import de.hft.stuttgart.citydoctor2.check.error.NotFloorError;
...
@@ -22,7 +22,9 @@ import de.hft.stuttgart.citydoctor2.check.error.NotFloorError;
import
de.hft.stuttgart.citydoctor2.check.error.NotGroundError
;
import
de.hft.stuttgart.citydoctor2.check.error.NotGroundError
;
import
de.hft.stuttgart.citydoctor2.check.error.NotWallError
;
import
de.hft.stuttgart.citydoctor2.check.error.NotWallError
;
import
de.hft.stuttgart.citydoctor2.check.error.NullAreaError
;
import
de.hft.stuttgart.citydoctor2.check.error.NullAreaError
;
import
de.hft.stuttgart.citydoctor2.check.error.PlanarityError
;
import
de.hft.stuttgart.citydoctor2.check.error.PointTouchesEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.PointTouchesEdgeError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonHoleOutsideError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonHoleOutsideError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonInteriorDisconnectedError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonInteriorDisconnectedError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonIntersectingRingsError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonIntersectingRingsError
;
...
@@ -31,9 +33,12 @@ import de.hft.stuttgart.citydoctor2.check.error.PolygonWithoutSurfaceError;
...
@@ -31,9 +33,12 @@ import de.hft.stuttgart.citydoctor2.check.error.PolygonWithoutSurfaceError;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonWrongOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.PolygonWrongOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingDuplicatePointError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingDuplicatePointError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingEdgeIntersectionError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingEdgeIntersectionError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingNotClosedError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingNotClosedError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingSelfIntersectionError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingTooFewPointsError
;
import
de.hft.stuttgart.citydoctor2.check.error.RingTooFewPointsError
;
import
de.hft.stuttgart.citydoctor2.check.error.SchematronError
;
import
de.hft.stuttgart.citydoctor2.check.error.SchematronError
;
import
de.hft.stuttgart.citydoctor2.check.error.SolidError
;
import
de.hft.stuttgart.citydoctor2.check.error.SolidNotClosedError
;
import
de.hft.stuttgart.citydoctor2.check.error.SolidNotClosedError
;
import
de.hft.stuttgart.citydoctor2.check.error.SolidSelfIntError
;
import
de.hft.stuttgart.citydoctor2.check.error.SolidSelfIntError
;
import
de.hft.stuttgart.citydoctor2.check.error.SurfaceUnfragmentedError
;
import
de.hft.stuttgart.citydoctor2.check.error.SurfaceUnfragmentedError
;
...
@@ -265,4 +270,29 @@ public class ListErrorVisitor implements ErrorVisitor {
...
@@ -265,4 +270,29 @@ public class ListErrorVisitor implements ErrorVisitor {
public
void
visit
(
PolygonWithoutSurfaceError
err
)
{
public
void
visit
(
PolygonWithoutSurfaceError
err
)
{
controller
.
highlight
(
err
.
getPolygon
(),
geom
);
controller
.
highlight
(
err
.
getPolygon
(),
geom
);
}
}
@Override
public
void
visit
(
RingError
err
)
{
// nothing to display
}
@Override
public
void
visit
(
PolygonError
err
)
{
// nothing to display
}
@Override
public
void
visit
(
RingSelfIntersectionError
err
)
{
// nothing to display
}
@Override
public
void
visit
(
PlanarityError
err
)
{
// nothing to display
}
@Override
public
void
visit
(
SolidError
err
)
{
// nothing to display
}
}
}
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/tree/ErrorItemVisitor.java
View file @
4921f946
...
@@ -2,13 +2,14 @@ package de.hft.stuttgart.citydoctor2.gui.tree;
...
@@ -2,13 +2,14 @@ package de.hft.stuttgart.citydoctor2.gui.tree;
import
java.util.List
;
import
java.util.List
;
import
de.hft.stuttgart.citydoctor2.check.AbstractErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.ErrorVisitor
;
import
de.hft.stuttgart.citydoctor2.check.error.AllPolygonsWrongOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.AllPolygonsWrongOrientationError
;
import
de.hft.stuttgart.citydoctor2.check.error.AttributeInvalidError
;
import
de.hft.stuttgart.citydoctor2.check.error.AttributeInvalidError
;
import
de.hft.stuttgart.citydoctor2.check.error.AttributeMissingError
;
import
de.hft.stuttgart.citydoctor2.check.error.AttributeMissingError
;
import
de.hft.stuttgart.citydoctor2.check.error.AttributeValueWrongError
;
import
de.hft.stuttgart.citydoctor2.check.error.AttributeValueWrongError
;
import
de.hft.stuttgart.citydoctor2.check.error.ConsecutivePointSameError
;
import
de.hft.stuttgart.citydoctor2.check.error.ConsecutivePointSameError
;
import
de.hft.stuttgart.citydoctor2.check.error.DegeneratedRingError
;
import
de.hft.stuttgart.citydoctor2.check.error.DependenciesNotMetError
;
import
de.hft.stuttgart.citydoctor2.check.error.DependenciesNotMetError
;
import
de.hft.stuttgart.citydoctor2.check.error.MultipleConnectedComponentsError
;
import
de.hft.stuttgart.citydoctor2.check.error.MultipleConnectedComponentsError
;
import
de.hft.stuttgart.citydoctor2.check.error.NestedRingError
;
import
de.hft.stuttgart.citydoctor2.check.error.NestedRingError
;
...
@@ -36,7 +37,6 @@ import de.hft.stuttgart.citydoctor2.check.error.SchematronError;
...
@@ -36,7 +37,6 @@ import de.hft.stuttgart.citydoctor2.check.error.SchematronError;
import
de.hft.stuttgart.citydoctor2.check.error.SolidNotClosedError
;
import
de.hft.stuttgart.citydoctor2.check.error.SolidNotClosedError
;
import
de.hft.stuttgart.citydoctor2.check.error.SolidSelfIntError
;
import
de.hft.stuttgart.citydoctor2.check.error.SolidSelfIntError
;
import
de.hft.stuttgart.citydoctor2.check.error.SurfaceUnfragmentedError
;
import
de.hft.stuttgart.citydoctor2.check.error.SurfaceUnfragmentedError
;
import
de.hft.stuttgart.citydoctor2.check.error.DegeneratedRingError
;
import
de.hft.stuttgart.citydoctor2.check.error.TooFewPolygonsError
;
import
de.hft.stuttgart.citydoctor2.check.error.TooFewPolygonsError
;
import
de.hft.stuttgart.citydoctor2.check.error.UnknownCheckError
;
import
de.hft.stuttgart.citydoctor2.check.error.UnknownCheckError
;
import
de.hft.stuttgart.citydoctor2.datastructure.ConcretePolygon
;
import
de.hft.stuttgart.citydoctor2.datastructure.ConcretePolygon
;
...
@@ -57,7 +57,7 @@ import de.hft.stuttgart.citydoctor2.utils.PolygonIntersection;
...
@@ -57,7 +57,7 @@ import de.hft.stuttgart.citydoctor2.utils.PolygonIntersection;
import
de.hft.stuttgart.citydoctor2.utils.PolygonIntersection.IntersectionType
;
import
de.hft.stuttgart.citydoctor2.utils.PolygonIntersection.IntersectionType
;
import
javafx.scene.control.TreeItem
;
import
javafx.scene.control.TreeItem
;
public
class
ErrorItemVisitor
implem
en
t
s
ErrorVisitor
{
public
class
ErrorItemVisitor
ext
en
d
s
Abstract
ErrorVisitor
{
private
static
String
nameOfAttribute
=
Localization
.
getText
(
"ErrorItemVisitor.nameOfAttribute"
)
+
": "
;
private
static
String
nameOfAttribute
=
Localization
.
getText
(
"ErrorItemVisitor.nameOfAttribute"
)
+
": "
;
private
static
String
childId
=
Localization
.
getText
(
"ErrorItemVisitor.childId"
)
+
": "
;
private
static
String
childId
=
Localization
.
getText
(
"ErrorItemVisitor.childId"
)
+
": "
;
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment